haxe
haxe copied to clipboard
Add Context.storeType
I'd like something like Context.storeTypedExpr for types.
In tink_macro this behavior is emulated per @:genericBuild class DirectType<@const Id> {} where the type is stored with a numerical id and then looked up again by id in the generic build macro.
I would very much like for this to be part of the compiler though, especially since calls like TypeTools.toComplexType could use it to represent everything (ideally it'd still try to create a proper ComplexType, but it could fill the unrepresentable blanks with something better than null).
Linking relevant branch: https://github.com/HaxeFoundation/haxe/tree/store_type