Skip to content

Bind block expressions to parent instance #7

@drslump

Description

@drslump

block expressions inside instance methods should generated code with this bound to the original self for the instance.

class Foo:
    _field = 'field'
    def getIt():
        return { x | return x + _field }

----

function getIt() {
    var self = this;
    return function (x) { return x + self._field };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions