In essence, when @type is encountered the compiler looks at TypeInfo_Struct (in object.di) for the equivalent xfuncname. Then uses the attributes of that function pointer (and also the parameter types/count) to compile the given method.

Why would you want to add explicit annotation for implicit TypeInfo_Struct methods? I think @type is a very interesting idea if combined with a string->method lookup in
TypeInfo_Struct, but this wouldn't allow for static type checking.
If you wanted static type checking then @type could probably refer to Interfaces.

Reply via email to