ajaxorg/cloud9 — Issue #1033: scope analysis broken for var a=b=12;
Author: fjakobs
Created: 2012-03-05 10:00:58+00:00
State: open

double assignment after a var statement makes all assigned variables local. In the example the current scope analyzer treats `c` as global.

```javascript
function a() {
var b = c = 12;
}

console.log(c)
```

```
$ node test.js

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: c is not defined
at Object. (/Users/fjakobs/Desktop/EclipseWorkspaces/ajax.org/cloud9-plugin/plugins-client/test.js:6:13)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
```