google / google/closure-compiler
java.lang.IllegalStateException: Unexpected variable bar
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Compiling the following in SIMPLE mode throws an exception instead of providing an error message.
``` js
(function(foo) {
var bar;
function foo() {
bar = true;
}
})();
```
> 23: java.lang.IllegalStateException: Unexpected variable bar
Full stack trace attached. It does not throw exceptions in other optimization modes.
[stack_trace.txt](https://github.com/google/closure-compiler/files/458078/stack_trace.txt)
Contributor guide
Assessment
This issue has not been assessed yet.