cincheo / jsweet

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

Global method with overload doesn't build #540

Closed Icare67 closed 4 years ago

Icare67 commented 4 years ago

This code does not build:


class Globals
{
    public static void foo() {
        System.out.println("no arguments");      
    }
    public static void foo(int len) {
        System.out.println("with arguments");
    }
}
public class QuickStart {   
    public static void test()   {
        Globals.foo();
        Globals.foo( 3);        
    }
    public static void main(String[] args) {
        test();

}

}

But if you rename Global to anything, it builds !!!

class Baz
{
    public static void foo() {
        System.out.println("no arguments");      
    }
    public static void foo(int len) {
        System.out.println("with arguments");
    }
}
public class QuickStart {   
    public static void test()   {
        Baz.foo();
        Baz.foo( 3);        
    }
    public static void main(String[] args) {
        test();

}

}