Skip to content

Fix type inference of local variables vs. DSLD contributions #605

@eric-milles

Description

@eric-milles

Consider the following:

some.dsld

contribute(enclosingMethod('foo')) {
  property name: 'bar', type: BigInteger
}

Script.groovy

def foo(Integer bar) {
  bar // should inference as Integer, not BigInteger
}

At present, DSLD contributions (from method and property) are overriding local parameter/variable declarations.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions