You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I remember a reason for it being as ugly as it is right now. I would've loved to generate the code you propose instead but I'm pretty sure meta-classes are going to implode if you go that route. Test well :)
C:\rock\sdk\lang\Character.ooc:172:25: note: (near initialization for 'lang_Character__Char_class.__super__.__super__.__super__.name')
C:\rock\sdk\lang\Character.ooc:194:29: error: initializer element is not constant
Was expecting an error of this nature, need to reconsider the generated code.
EDIT:
Alternative codegen: Generate the above without the '.name' field, initialize '.name' in the module load.
Here is a sample _class() function the backend generates lifted from the following class:
Obviously, this function is not thread safe.
Proposed generated code:
Also, anywhere test__Foo_class() would appear, we replace it with &test__Foo_class.
The text was updated successfully, but these errors were encountered: