Commit Graph

2 Commits

Author SHA1 Message Date
Kyle Marek-Spartz
4cac6ce201 fix: remove redundant "Receiver" prefix from method-not-found error message
The error message for unimplemented methods previously included the word "Receiver"
before the class name, which was redundant and inconsistent with other error messages.
Updated the format string in `methodNotFound()` to drop "Receiver" and use the class
name directly. Added a new test case for static method not found errors and updated
existing test expectations to match the new message format.
2014-02-24 03:53:49 +00:00
Bob Nystrom
15d9dc229c feat: prevent metaclass inheritance and disallow super in static methods
Remove the metaclass inheritance chain that mirrored the class hierarchy, instead always binding metaclasses directly to Class. This prevents static methods from being inherited by subclasses. Also add a compile-time error when `super` is used inside a static method, since it would always delegate to Class without useful effect. Update the `isInsideMethod` check to use `compiler->fields` instead of walking the parent chain for correctness. Add test cases for the new restrictions and remove the old test that verified static method inheritance.
2014-01-18 01:29:10 +00:00