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 and syntax highlighting for trait property references #960

Closed
eric-milles opened this issue Sep 22, 2019 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Sep 22, 2019

Consider the following:

trait T {
  Number number
}

class C implements T {
  def m() {
    def n = number
    number = 'value'

    n = this.number
    this.number = 'value'

    n = getNumber()
    setNumber('value')

    n = T.super.number
    T.super.number = 'value'
  }
}

The property expressions "number" within C.m() are inconsistently highlighted (see below) and code hover shows C.getNumber() or C.setNumber(Number value) instead of T.number or T.getNumber() or T.setNumber(Number value).

image

image

@eric-milles
Copy link
Member Author

image

@eric-milles
Copy link
Member Author

image

@eric-milles
Copy link
Member Author

eric-milles commented Sep 23, 2019

References to properties within the trait itself have some issues as well:

image

"this" should not be selectable or highlighted as field. " = " should be highlighted as operator not field. Code select extends to trailing comments as well.

@eric-milles
Copy link
Member Author

image

@eric-milles
Copy link
Member Author

image

eric-milles added a commit that referenced this issue Oct 7, 2019
    trait T {
      Number number
    }
    class C implements T {
      void meth() {
        getNumber() // F3 over name
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant