In scripts, and when using GetTypeInfoByDecl
, it is possible to get a global type when asking for a namespaced type (which might not even exist). For example, registering an enum Foo
in the global namespace and then calling GetTypeInfoByDecl("Bar::Foo")
results in it returning the type of the global Foo
.
The following script should throw (several) compiler errors, but it doesn't:
enum SomeEnum {
X
}
class SomeClass {
}
void Main() {
Bar::SomeEnum e;
Bar::SomeClass c;
}