Skip to content

DSLD pointcut hasArgument does not support variable expression name matching #602

@eric-milles

Description

@eric-milles

config.dsld

contribute(enclosingCall(name('withConfig') & hasArgument('configuration')) & inClosure() & isThisType()) {
  method(name:'imports', type:void, params:[block:Closure])
}

config.groovy

withConfig(configuration) {
  imports {
    ...
  }
}

The method call expression imports infers as unknown because the hasArgument('configuration') pointcut does not match on the passed variable expression. Note, hasArgument(name('configuration')) does match, so this change would close a gap (i.e. offer a shorthand notation).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions