Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eric-milles opened this issue Jun 11, 2018 · 0 comments
Assignees
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Jun 11, 2018

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).

@eric-milles eric-milles self-assigned this Jun 11, 2018
@eric-milles eric-milles added this to the v3.0.0 milestone Jun 11, 2018
eric-milles added a commit that referenced this issue Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant