Simn / genjvm

13 stars 1 forks source link

Stack overflow on recursive signatures #30

Closed Simn closed 5 years ago

Simn commented 5 years ago

E.g.

typedef T = haxe.ds.Vector<T -> Void>;

class Main {
    static public function main() {

    }

    static function x(t:T) { }
}

This probably affects all compound signature types.

Simn commented 5 years ago

This one is a bit concerning, not sure what signature I'm supposed to generate here.

nadako commented 5 years ago

In Kotlin,

typealias T = Array<(T)->Unit>

just gives error: recursive type alias in expansion: T. I wonder if a typedef like this makes sense...

Simn commented 5 years ago

What I can tell you is that somewhere in our unit tests something like this exists.

Simn commented 5 years ago

It's here: https://github.com/HaxeFoundation/haxe/blob/development/tests/unit/src/unit/issues/Issue3024.hx#L14

nadako commented 5 years ago

Well, apparently you dealt with this once already: ca29a4fa89a1a9f29e5f53c16f54deba55d3708b

Simn commented 5 years ago

The problem here is that we need a value...