haxe
haxe copied to clipboard
Cannot resolve std.Module.AnyClass
Like the titel says: It is currently impossible to resolve a sub class in a module with std.
std.Module.AnyClass => Class<Module> has no field AnyClass
I think if its not find any field it should look up the Types. Like the documentations says: https://haxe.org/manual/type-system-resolution-order.html
https://github.com/HaxeFoundation/haxe/issues/8470
What exactly is being reported here? var x:std.Type.ValueType; works as expected.
@Simn here is an example:
class Main {
static function main() {
test(std.Type.ValueType); // src/Main.hx:3: characters 8-26 : Class<Type> has no field ValueType
}
static function test<T>(cls:Class<T>) {}
}
Ah, so it's about expression-level. And that means we're talking about that code, so I recommend that you work around this.
@Simn i now fix it with an typedef.
You think that it is impossible to fix. Or? Because it would be too complicated?
What about the idea of a "class" construtor? "new Class<std.Type.ValueType>()"
this would a better workaround and i think it is simpler to implate this.