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

Bug 316220

Summary: Deprecated members not crossed out within for loops
Product: z_Archived Reporter: Jacob Weber <jacob>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P1 CC: gadi, ganoro, jacek.pospychala
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix - ForStatement
jacek.pospychala: iplog+
Patch - AST unitests
jacek.pospychala: iplog+
Not crossed deprecated class variable none

Description Jacob Weber CLA 2010-06-08 19:06:43 EDT
Create a new file, and paste in the following:
<?
class Test {

	/**
	 * @deprecated
	 */
	protected $arr;

	public function go() {
		$this->arr[0] = 1;
		$a = 1;
		if ($a == 1) {
			$this->arr[$a] = 3;
		}
		for ($i = 0; $i < 10; $i++) {
			$this->arr[$i] = 2;
		}
	}
}
?>

In the editor, arr[0] and arr[$a] are crossed out, but not arr[$i].



-- Configuration Details --
Product: Eclipse 1.3.0.20100526-1935 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100527-9gF78GpqFt6trOGhCMC-p4sxjlLvz0FU_i

PHP Development Tools (PDT) SDK Feature	2.2.0.v20100519-1400-53-84QAN2IGRoLXQN3T6XXRLa9Od	org.eclipse.php.sdk.feature.group
Comment 1 ronen hamias CLA 2010-06-13 08:05:00 EDT
Created attachment 171803 [details]
Fix - ForStatement
Comment 2 ronen hamias CLA 2010-06-13 08:07:54 EDT
Comment on attachment 171803 [details]
Fix - ForStatement

Statement super contractor must initialize with start position and end position
Comment 3 Roy Ganor CLA 2010-06-13 08:29:44 EDT
fixed,

thanks for the contribution!
Comment 4 ronen hamias CLA 2010-06-14 04:23:15 EDT
Created attachment 171816 [details]
Patch - AST unitests

Fixed unitests expected behavior
Comment 5 Roy Ganor CLA 2010-06-14 05:28:49 EDT
committed to head, thanks!
Comment 6 Gadi Goldbarg CLA 2010-06-16 12:30:24 EDT
Retested at PDT-2.2.0.v20100616 over Windows XP and Mac OS X 10.6.2 - the same behavior - only three of deprecated variables are crossed out - the for one at for loop is not - see attached. No error log are recorded to this behavior

Reopened by
Teodor Kirkov
teodor.k@zend.com
Comment 7 Gadi Goldbarg CLA 2010-06-16 12:31:03 EDT
Created attachment 172055 [details]
Not crossed deprecated class variable
Comment 8 Roy Ganor CLA 2010-06-22 06:54:27 EDT
fixed
Comment 9 Gadi Goldbarg CLA 2010-08-23 10:02:21 EDT
[Petyo Tanchev]

Tested on 2.2.0 from 13.08.2010
All deprecated variables are crossed out.