Closed
Description
This issue was originally filed by @tomyeh
What steps will reproduce the problem?
- Compile the following code
class C {
Set<String> _classes;
void run() {
final StringBuffer out = new StringBuffer();
if (_classes != null)
for (final String cls in _classes) {
out.add(' ').add(cls);
}
}
}
void main() {
new C().run();
}
What is the expected output? What do you see instead?
frogc generated the wrong JS code:
if (this._classes != null) var $$list = this._classes;
for (var $$i = $$list.iterator(); $$i.hasNext(); ) {
var cls = $$i.next();
out.add(" ").add(cls);
}
Obviously, a curly brace is missed to enclose var $$list...