jsweet
jsweet copied to clipboard
Variables named document, window not sanitized
public class ThingA {
void x() {
int document = 3;
Globals.document.createElement(StringTypes.div);
}
}
produces the error
property 'createElement' does not exist on type 'number'
because Globals.document
becomes document
and collides with the declaration on the previous line.
The same things happens if there's a variable named window
and Globals.window
is accessed.