In the code below, the class and the struct are identical, but the Struct doesn't list the constructor when GetDecls() is used and the Class does.
Using the latest dev branch.
Namespace test
#Import "<reflection>"
#Reflect test..
Function Main()
Local c := New TestClass
For Local d := Eachin Variant( c ).Type.GetDecls()
Print "~t" + d
Next
Print ""
Local s := New TestStruct
For Local d := Eachin Variant( s ).Type.GetDecls()
Print "~t" + d
Next
End
Class TestClass
Field a:Int
Field b:String
Method Show()
Print a + b
End
End
Struct TestStruct
Field a:Int
Field b:String
Method Show()
Print a + b
End
End
Original Author: DoctorWhoof
Not sure if a bug or expected behavior.
In the code below, the class and the struct are identical, but the Struct doesn't list the constructor when GetDecls() is used and the Class does.
Using the latest dev branch.
Cheers!