haxetink / tink_macro

The macro toolkit
MIT License
57 stars 18 forks source link

catchBounce hangs #34

Open kevinresol opened 3 years ago

kevinresol commented 3 years ago

TBH, I am not exactly sure where to report this.

Repro case: https://github.com/kevinresol/haxe_issues/tree/tink_macro_34

haxe build.hxml -v will hang with:

...
Exiting macro tink.macro.Types.resolveDirectType
Typing tink.pure._Vector.Vector_Impl_.fromIterable
Typing tink.pure._Vector.Vector_Impl_._new
Typing Main.data
Typing tink.pure._List.List_Impl_.fromArray
Typing tink.pure._List.Node.new
Typing tink.pure._List.Node.EMPTY
Typing tink.pure._List.List_Impl_.toIterable
Typing tink.pure._List.List_Impl_.iterator
Typing tink.pure.NodeIterator.new
Typing tink.pure.NodeIterator.hasNext
Typing tink.pure.NodeIterator.next
Exiting macro tink.macro.Bouncer.catchBounce
kevinresol commented 3 years ago

Apparently something is unable to infer the type parameter of tink.pure.Vector.

Explicitly type-hinting fixes it: <Foo data=${(Vector.fromIterable(data):Vector<Bar>)}/>