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:
Kyle Marek-Spartz
2015-01-09 21:14:06 +00:00
parent 7fd1e5eeaa
commit dd0760a54c
2 changed files with 20 additions and 19 deletions
+1
View File
@@ -1 +1,2 @@
super.foo // expect error
super // expect error