Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316220 - Deprecated members not crossed out within for loops
Summary: Deprecated members not crossed out within for loops
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 minor (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 19:06 EDT by Jacob Weber CLA
Modified: 2020-05-14 11:07 EDT (History)
3 users (show)

See Also:


Attachments
Fix - ForStatement (2.77 KB, text/plain)
2010-06-13 08:05 EDT, ronen hamias CLA
jacek.pospychala: iplog+
Details
Patch - AST unitests (14.74 KB, text/plain)
2010-06-14 04:23 EDT, ronen hamias CLA
jacek.pospychala: iplog+
Details
Not crossed deprecated class variable (58.35 KB, image/png)
2010-06-16 12:31 EDT, Gadi Goldbarg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.