cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 160 forks source link

Invalid access to static method with this #46

Closed renaudpawlak closed 8 years ago

renaudpawlak commented 8 years ago

Accessing a valid method through "this" is valid in Java (warning only). JSweet should either report an error, or remove the "this".

class My {
  private static Logger log; //...
  void x() {
    this.log.info(...);
  }
}
renaudpawlak commented 8 years ago

Fixed for static methods and fields (members). JSweet reports an error, which is less permissive than Java.