ckknight / gorillascript

GorillaScript is a compile-to-JavaScript language designed to empower the user while attempting to prevent some common errors.
MIT License
300 stars 34 forks source link

Fix "this" in try/catch statement #152

Closed kkirby closed 9 years ago

kkirby commented 10 years ago

When referencing "this" in a try/catch statement that is scoped in a function with a bound context, the "this" would be the function's "this" and not the outer "this".

class MyClass
    def doStuff()
        let a = #()@
            try
                @doStuff()
            catch err
                @doStuff()