HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.03k stars 648 forks source link

Don't bind foreign type parameters in definition mode #11658

Closed Simn closed 1 month ago

Simn commented 1 month ago

This changes link so that it no longer binds monomorphs to type parameters that are not known in the current context. For now we're only doing this in the new definition mode.

This likely breaks some code.

Closes #11624

Simn commented 1 month ago

@kLabz Could you check how badly this breaks stuff? I'm not sure how prevalent cases like in #11624 really care, and ultimately it doesn't really matter because such code is clearly broken, but I'd still like to make people aware of this change.

kLabz commented 1 month ago

Things look ok so far, will test more this afternoon

Edit:

kLabz commented 1 month ago

Seems to be fine :)

Simn commented 1 month ago

I thought you'd come across a case from #11624 in the wild because I thought that's where those came from, but I won't complain!

kLabz commented 1 month ago

Either that problem was probably fixed on user code since I opened the issue, or that was a report from a private project. Either way, it doesn't seem to be a common thing :)

kLabz commented 1 month ago

Apparently there's such case in tink: https://try.haxe.org/#2D89fEF9 (this PR still isn't available on try haxe)