Skip to content

Fix type inferencing for array clone() method #1589

@eric-milles

Description

@eric-milles

Consider the following:

void test(String[] array) {
  def clone = array.clone()
}

The inferred type of "clone" is java.lang.Object when java.lang.String[] is expected. https://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html#jls-10.7

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions