Commit Graph

1 Commits

Author SHA1 Message Date
Bob Nystrom
93cf4e6b87 feat: add compile-time error for 'super' used outside method context
Add isInsideMethod helper that walks the compiler's parent chain to detect
if the current compilation scope is within a method. Use it in super_()
to emit a compile error when 'super' is used at top level or inside a
top-level function, with corresponding test cases for both scenarios.
2013-12-16 06:08:40 +00:00