Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354551

Summary: No type-inference for return types with use statements
Product: z_Archived Reporter: Robert Gruendler <robert>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ganoro, kalin.a, zhaozhongwei
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
reproducable test case
none
new SomeClass none

Description Robert Gruendler CLA 2011-08-11 16:48:53 EDT
Build Identifier: I20110613-1736

type inference does not work for methods annotated with PHPdocs which return a class imported through a "use" statement. ie:

use Foo\Bar\SomeClass;

/**
 * @return SomeClass
 * 
*/
public function getSome() {

  return new SomeClass();
}




Reproducible: Always

Steps to Reproduce:
Create a PDT project, import the 3 attached files, try to complete the $some variable in Test.php
Comment 1 Robert Gruendler CLA 2011-08-11 16:49:42 EDT
Created attachment 201353 [details]
reproducable test case
Comment 2 Zhongwei Zhao CLA 2011-10-11 03:23:30 EDT
fixed in head
Comment 3 Kalin CLA 2011-10-18 05:18:47 EDT
Still reproducible. No relevant item is suggested.
Comment 4 Zhongwei Zhao CLA 2011-11-08 21:29:57 EST
Created attachment 206638 [details]
new SomeClass
Comment 5 Zhongwei Zhao CLA 2011-11-08 21:31:15 EST
the original SomeClass does not have any methods or public fields,so no  is suggested.
Please the attached file to test.
Comment 6 Kalin CLA 2012-07-03 10:07:22 EDT
Verified fixed.
Closing...

Kalin Yanev
kalin.a@zend.com