What steps will reproduce the problem?
1. Set js2-missing-semi-one-line-override to t.
2. Opening a js file with content:
/* -*- mode:js2 -*- */
for(var i = 0; i < 5; i++) {
function identity(x) {return x}
}
function identity2(x) {return x}
What is the expected output? What do you see instead?
I expected to see no warnings but the first {return x} is underlined with a
warning face while the second {return x} is not.
js2-mode 20090814 in GNU Emacs 24.0.50.1 on Windows 7.
The minimal example above may be contrived but I found the bug while trying the
following code from a blog post:
function wrap(callback) {
callback();
}
console.log('Simple wrap');
for(var i = 0; i < 5; i++) {
wrap(function() {console.log(i)});
}
Original issue reported on code.google.com by jisang.y...@gmail.com on 24 Jan 2012 at 4:34
Original issue reported on code.google.com by
jisang.y...@gmail.com
on 24 Jan 2012 at 4:34