Title:
[ANeff] Bug for: Code Analyzer doesn't warn when assigning local to non-struct
| View in TrackerStatus/Resolution/Reason: To Fix//Investigate
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/20/2015
Components: Administrator
Versions: 11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 0
Code Analyzer doesn't warn when assigning local to non-struct
Repro:
1) Create file containing the following:
<cfscript>
function f() {var local=[];}
f();
</cfscript>
2) In Code Analyzer, choose "Directory to Analyze" as the file's parent directory
3) Click "Run Analyzer"
Actual result: no warning about only being allowed to assign local to a non-struct
Expected result: a warning about only being allowed to assign local to a non-struct
This exception that CF throws when running the code could be used as a guide:
--------------------------------------------
LOCAL is explicit scope in ColdFusion 9.
You can only assign LOCAL to a struct. You cannot assign LOCAL to coldfusion.runtime.Array
--------------------------------------------
Verified in CF11 Update 7 (build 11,0,07,296330).
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4101908
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
Attachments:
Comments: