SOMns
SOMns copied to clipboard
Assertion instead of Error when inheriting from instance instead of class
The following program causes an assertion, instead of a language-level error:
class InheritFromInstance usingPlatform: platform = Value ()(
class AOb = getSuper ()()
private getSuper = (
^ Object new
)
public main: args = (
| b = objL getSuper ()(). |
AOb new.
^ 0
)
)
The solution would be to add proper checks instead of relying on assertions. If the checks fail, we would need to signal a proper language-level error.