fix: guard super() compilation against null enclosingClass to prevent segfault
When `super` is called at top-level with no arguments, `enclosingClass` is null, causing a segfault when trying to access its method name. This fix wraps the unnamed super call logic inside an else branch that only executes when `enclosingClass` is non-null, and adds a test case for the unnamed `super` call at top-level.
This commit is contained in:
@@ -1 +1,2 @@
|
||||
super.foo // expect error
|
||||
super // expect error
|
||||
|
||||
Reference in New Issue
Block a user