Skip to content

Instantly share code, notes, and snippets.

@alien11689
Created July 21, 2016 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alien11689/b681a4b23023ebd6d12aa30c827cd346 to your computer and use it in GitHub Desktop.
Save alien11689/b681a4b23023ebd6d12aa30c827cd346 to your computer and use it in GitHub Desktop.
$ groovy test.groovy
Caught: groovy.lang.MissingPropertyException: No such property: foo for class: Foo
groovy.lang.MissingPropertyException: No such property: foo for class: Foo
at Foo$_bar_closure1.doCall(test.groovy:10)
at Foo.bar(test.groovy:9)
at Foo$bar.call(Unknown Source)
at test.run(test.groovy:20)
class Foo {
private final String foo
Foo(String foo){
this.foo = foo
}
static bar(){
'some'.collectReplacements {
if (it in foo){
return 'o'
}else {
return null
}
}
}
}
Foo.bar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment