Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add self return type to methods #83

Closed
dzikoysk opened this issue Jan 1, 2019 · 1 comment
Closed

Add self return type to methods #83

dzikoysk opened this issue Jan 1, 2019 · 1 comment
Assignees
Milestone

Comments

@dzikoysk
Copy link
Member

dzikoysk commented Jan 1, 2019

class Builder {

    hidden Foo o

    method self includeFoo(Foo foo) {
        this.foo = foo
    }

}

main {
    Builder builder = new Builder()
            .includeFoo(new Foo())
}
@dzikoysk dzikoysk added this to the After alpha release milestone Jun 16, 2019
@dzikoysk dzikoysk added future and removed future labels Jun 16, 2019
@dzikoysk dzikoysk self-assigned this Aug 19, 2020
@dzikoysk
Copy link
Member Author

dzikoysk commented Aug 19, 2020

type Builder {
    internal Foo o

    shared includeFoo (Foo foo) -> self {
        this.foo = foo
    }
}

main {
    Builder builder = new Builder()
            .includeFoo(new Foo())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant