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

Fix type inferencing for Closure-specific methods and properties #809

Closed
eric-milles opened this issue Feb 8, 2019 · 0 comments
Closed
Assignees
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Feb 8, 2019

Consider the following:

class Foo {
  def xxx
  class Bar {
    def xxx
  }
  class Baz {
    def xxx
  }

  void meth() {
    new Bar().with {
      new Baz().with {
        xxx // refers to Baz.xxx
        owner.xxx refers to Bar.xxx
        getOwner().xxx // refers to Bar.xxx
        owner.owner.xxx // refers to Foo.xxx
        getOwner().getOwner().xxx // refers to Foo.xxx
        this.xxx // refers to Foo.xxx
        thisObject.xxx // refers to Foo.xxx
        getThisObject().xxx // refers to Foo.xxx
      }
    }
  }
}

With the nested closures, type inferencing of expressions like "owner.owner.xxx" breaks down and "xxx" is shown as underlined (unknown). These can be generated from content assist now (see #803 and #364) so they should infer correctly once inserted to avoid confusion.

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