HaxeFoundation / haxe

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

[PHP] problem with autoload #5757

Closed filt3rek closed 7 years ago

filt3rek commented 7 years ago

Hej, It's a bit difficult to explain because I've never seen an error like that but let's say I've a SPOD class like that :

import sys.db.Types;
import sys.db.Object;
class MyClass extends Object {
    public var id   : SId;
}

Then I just do that in the entry point function : trace( haxe.rtti.Meta.getType( MyClass ).rtti ); And I get this error : Missing @rtti for class Andreas Mokros said that it's a problem with autoload on PHP so I think it's not really related to SPOD To solve this problem, you have to add a var v = new MyClass(); just before the call that throw the exception and then it works.

And coming back to the error message, I think it should be "Missing @:rtti for class" and not @rtti right ?

RealyUniqueName commented 7 years ago

Fixed