Status/Resolution/Reason: Closed/Deferred/NotEnoughTime
Reporter/Name(from Bugbase): Andrew Scott / Andrew Scott (Andrew Scott)
Created: 10/09/2013
Components: Core Runtime
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Win 2008 Server
Vote Count: 9
Problem Description:
While doing a bit of code re-factoring I ran into an error with the following code.
public void function myMethod(testVar) {
var testVar = "defined locally!!";
}
The error indicated that the testVar already existed in the arguments scope, this is wrong behavior to begin with. But if we use the new local scope like such
public void function myMethod(testVar) {
local.testVar = "defined locally!!";
}
We actually get the correct behavior, where the testVar variable is stored locally. Where as the first example, is incorrectly throwing an error.
Steps to Reproduce:
Actual Result:
Expected Result:
Any Workarounds:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3648120
External Customer Info:
External Company:
External Customer Name: ascott67
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: