Issue Details (XML | Word | Printable)

Key: FDT-3744
Type: Bug Bug
Status: Confirmed Confirmed
Priority: Minor Minor
Assignee: FDT Team
Reporter: Andrew Macrae
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FDT

false error flagging for XML attribute selectors

Created: 07/Apr/17 10:22 PM   Updated: 10/Apr/17 03:01 PM
Component/s: Parser
Affects Version/s: FDT
Fix Version/s: None
Security Level: public

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. strange error.jpg
(37 kB)
Environment: MacOS 10.12.4, FDT Standalone 1.17.81.1853


 Description  « Hide
in XML expressions such as:

_config.info..question.(@id == "missed")

which is filtering for XML node:

<question id="missed" type="single">

the scope for 'id' seems to leak into the entire class. The class uses 'id' as a local variable in many places, and FDT is flagging warnings and errors for the XML expression even though 'id' inside the brackets has nothing to do with anything outside of the brackets.
Warnings such as:

private function updateAnswered(id:String):void { — The variable name 'id' is ambiguous because of class 'id', found 'id' at...

There is no class 'id' anywhere; but FDT appears to think that the 'id' attribute in XML is a class

In fact, for the expression noted above, FDT generates an error flag:

The operator '==' does not accept arguments of type 'Class' and type 'String'. Found '@id==qID' at line 121 column 50.

Of course the code compiles and runs just fine.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Andrew Macrae added a comment - 07/Apr/17 10:24 PM
two separate (but similar) class files, in one FDT has generated the error, in the other not.
Once FDT has flagged the error it is impossible to get rid of it by cleaning project or whatever.