This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270104 - A "second assignment to a variable" hint incorrectly generated
Summary: A "second assignment to a variable" hint incorrectly generated
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 09:21 UTC by jnm
Modified: 2017-03-17 09:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (250.19 KB, text/plain)
2017-03-17 09:21 UTC, jnm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jnm 2017-03-17 09:21:51 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_66
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.66-b18

Reproducibility: Happens every time

STEPS:
 The following code in PHP generates a hint:  1 assignment 2 used incorrectly.

The second "assignment" has not been noted that it is an indirect assignment, preceded by $$ instead of just $.  

function FeeScales($name,$hint) {
  $hintname="${name}Hint";
  global $$hintname;
  $$hintname=$hint;
}
ACTUAL:
Both the assignment statements are flagged as being assignments to "$hintname" 

EXPECTED:
 No error or hint should be flagged
Comment 1 jnm 2017-03-17 09:21:55 UTC
Created attachment 163872 [details]
IDE log