Skip to content

Improve code hover for advanced assignment or instanceof cases #1534

@eric-milles

Description

@eric-milles

Consider the following:

class Pogo { }
trait Todo { }
void test(Pogo pogo) {
  if (pogo instanceof Todo) {
    pogo // Pogo & Todo
  }
}
@groovy.transform.TypeChecked
void test(flag) {
  def list = flag ? [1] : [""] // ArrayList<Integer or String>
}

Hover for last occurrence of "pogo" shows Pogo and hover for "list" shows ArrayList<? extends Serializeable<? extends Serializeable<Integer>>

image

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions