Skip to content

Fix type inferencing for array and outer class type vars #1634

@eric-milles

Description

@eric-milles

Consider the following:

class C<T> {
  T[] m() {}
}
def c = new C<String>()
c.m()

Hovering over "m" does not show String[] as the inferred return type of the method.

Image

Similarly, the outer class type args are not propagated to inner class object expressions.

class C<T> {
  class D {
    T m(T[] head, T tail) { tail }
  }
}

def c = new C<String>()
def d = c.new C.D()
d.m(null, null)
Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions