Created
July 21, 2016 16:34
-
-
Save alien11689/b681a4b23023ebd6d12aa30c827cd346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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