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
Idea is to give every class that has a companion a method $companionObject that has term ref to a companion object as a return type. Every object that has a companion class will get a $companionClass method with a return type that indicates a class.
I'm not sure if those methods should be generated in bytecode, but $companionObject could have valid uses in runtime.
Note that it's not obvious how to generate those methods. Eg: generation $companionObject method is simple only if the returning value is static. Otherwise the object and the class instance could have different lifetime and this means that non-static classes would require a field to support this.
The text was updated successfully, but these errors were encountered:
DarkDimius
changed the title
Changing the way how companion class <-> companion object
Changing the way how \"companion class <-> companion\" object links work
Feb 9, 2015
DarkDimius
changed the title
Changing the way how \"companion class <-> companion\" object links work
Changing the way how "companion class <-> companion" object links work
Feb 9, 2015
Idea is to give every class that has a companion a method
$companionObject
that has term ref to a companion object as a return type. Every object that has a companion class will get a$companionClass
method with a return type that indicates a class.I'm not sure if those methods should be generated in bytecode, but
$companionObject
could have valid uses in runtime.Note that it's not obvious how to generate those methods. Eg: generation
$companionObject
method is simple only if the returning value is static. Otherwise the object and the class instance could have different lifetime and this means that non-static classes would require a field to support this.The text was updated successfully, but these errors were encountered: