Skip to content

Commit

Permalink
Tweak test to show that fix for GROOVY-6582 works.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwhite authored and paulk-asert committed Mar 7, 2014
1 parent fd6d462 commit e386b5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/groovy/lang/ScriptTest.java
Expand Up @@ -67,10 +67,12 @@ public void testGROOVY_6582() {
String script = "" +
"abstract class DeclaredBaseScript extends Script {\n" +
" def v = { it * 2 }\n" +
" def z = { it * 3 }\n" +
" def getProperty(String n) { n == 'c' ? v : super.getProperty(n) }\n" +
"}\n" +
"@groovy.transform.BaseScript DeclaredBaseScript baseScript\n" +
"assert c(2) == 4";
"assert c(2) == 4\n" +
"assert z(2) == 6";

GroovyShell shell = new GroovyShell();
shell.evaluate(script);
Expand Down

0 comments on commit e386b5d

Please sign in to comment.