cincheo / jsweet

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

Issue with local class declaration #547

Open iffyio opened 4 years ago

iffyio commented 4 years ago

The following code doesn't compile:

package quickstart;
public class QuickStart {
  public static void main(String[] args) {
    class Foo {
    }
    Foo f = new Foo();
  }
}

ERROR output:55 - namespace 'quickstart.QuickStart' has no exported member 'main' at...

While this compiles okay:

package quickstart;
public class QuickStart {
  public static void main(String[] args) {
    class Foo {
    }
    Object f = new Foo();
  }
}
lgrignon commented 4 years ago

Hey @iffyio, how is it going for you? Are you still using JSweet? I finally got something pretty stable with JSweet 3 (supporting Java 11!) Do you want to give a try fixing this small bug on the new version? The new Java Compiler API is pretty neat.

Bye

iffyio commented 4 years ago

Hi @lgrignon! we ended up not leveraging JSweet for our project so I haven't used it since. I'm not able to commit to fixing this bug due to other priorities at the moment so feel free if anyone wants to have a go at it instead. I'll be trying out JSweet 3 when I have some bandwidth, it looks intriguing :smile: