Question

I'm using rtti in haxe nme. It works well when targeting flash but when compiling to a cpp target I receive the following error.

error C2039: '__rtti' : is not a member of 'Class_obj'

I'm doing this...

public function doSomething(type:Class<Dynamic>):Void {
    var typeInfo:String = untyped type.__rtti;
}

I also tried...

public function doSomething <T:Infos> (type:Class<T>):Void {
    var typeInfo:String = untyped type.__rtti;
}

What should I do?

Was it helpful?

Solution

Make it looser! :Dynamic instead of :Class<Dynamic>

public function doSomething(type:Dynamic):Void {
    var typeInfo:String = untyped type.__rtti;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top