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

Bug 366926

Summary: /* @var */ completion does not use correct scope
Product: z_Archived Reporter: sparrow Mising name <wrobel>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: silviya, zhaozhongwei
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description sparrow Mising name CLA 2011-12-16 05:35:36 EST
In the following example:

	public function method1()
	{
		$table = ...; /* @var $table Class1 */
		...
	}

	public function method2()
	{
		$table = ...; /* @var $table Class2 */
		$table.
		...
	}
	
completion for the second $table shows method of Class1 instead of Class2
Comment 1 Zhongwei Zhao CLA 2012-05-15 01:24:30 EDT
fixed
Comment 2 Zhongwei Zhao CLA 2012-07-09 22:44:41 EDT
Full example:

<?php
class Class1 {
	function test1() {
		;
	}
}
class Class2 {
	function test2() {
		;
	}
}
class Class3 {

    public function method1()
    {
        $table = ""; /* @var $table Class1 */
    }

    public function method2()
    {
        $table = ""; /* @var $table Class2 */
        $table->| //here should propose test2
    }
}
Comment 3 Sylvia Tancheva CLA 2012-07-10 03:57:35 EDT
Verified. Closing.
Ilina Stefanova

Thanks, Zhao