Simn / genjvm

13 stars 1 forks source link

[quest] Haxe unit test compilation #34

Closed Simn closed 5 years ago

Simn commented 5 years ago
eq(child.someField(ChildJava2), 51);

No idea why this is so special.

That's #30

That's https://github.com/Simn/genjvm/issues/29#issuecomment-478681966


Getting close!

Simn commented 5 years ago

The first one is a stupid problem specific to Class<T>:

class Main {
    static public function main() {
        var c = new Main();
        Sys.println(c.someField(Main));
    }

    public function new() { }

    @:overload public function someField(c:Class<Dynamic>) {
        return 0;
    }
}

The problem is that I have @:native("java.lang.Class") on Class and that has already been applied at this point, which makes the unification | TAnon an, TAbstract ({ a_path = [],"Class" },[pt]) -> not match.

Simn commented 5 years ago

Since only #30 remains I'll close this one.