Repository: groovy Updated Branches: refs/heads/parrot a8e2874f7 -> 83e26af51
Add a test case for GROOVY-4438: Use of an inner enum causes compilation to go into infinite loop Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/83e26af5 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/83e26af5 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/83e26af5 Branch: refs/heads/parrot Commit: 83e26af514f9d349937f110919dd78bdcb62316e Parents: a8e2874 Author: sunlan <[email protected]> Authored: Wed Jan 25 00:47:58 2017 +0800 Committer: sunlan <[email protected]> Committed: Wed Jan 25 00:47:58 2017 +0800 ---------------------------------------------------------------------- .../groovy/parser/antlr4/GroovyParserTest.groovy | 14 +++++++------- .../src/test/resources/bugs/BUG-GROOVY-4438.groovy | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/83e26af5/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy ---------------------------------------------------------------------- diff --git a/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy b/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy index 5b78c40..5cefbf9 100644 --- a/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy +++ b/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy @@ -328,13 +328,6 @@ class GroovyParserTest extends GroovyTestCase { doTest('core/Unicode_01.groovy'); } - void "test groovy core - BUG"() { - doRunAndTest('bugs/BUG-GROOVY-4757.groovy'); - doRunAndTest('bugs/GROOVY-3898.groovy'); - doRunAndTest('bugs/BUG-GROOVY-5652.groovy'); - doRunAndTest('bugs/BUG-GROOVY-4762.groovy'); - } - void "test groovy core - BreakingChanges"() { doRunAndTest('core/BreakingChange_01x.groovy'); doRunAndTest('core/BreakingChange_02x.groovy'); @@ -346,4 +339,11 @@ class GroovyParserTest extends GroovyTestCase { doRunAndTest('core/Array_01x.groovy'); } + void "test groovy core - BUG"() { + doRunAndTest('bugs/BUG-GROOVY-4757.groovy'); + doRunAndTest('bugs/GROOVY-3898.groovy'); + doRunAndTest('bugs/BUG-GROOVY-5652.groovy'); + doRunAndTest('bugs/BUG-GROOVY-4762.groovy'); + doRunAndTest('bugs/BUG-GROOVY-4438.groovy'); + } } http://git-wip-us.apache.org/repos/asf/groovy/blob/83e26af5/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-4438.groovy ---------------------------------------------------------------------- diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-4438.groovy b/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-4438.groovy new file mode 100644 index 0000000..c62dfec --- /dev/null +++ b/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-4438.groovy @@ -0,0 +1,8 @@ +enum Outer { + A, B + enum Inner{X, Y} +} +assert Outer.A instanceof Outer +assert Outer.B instanceof Outer +assert Outer.Inner.X instanceof Outer.Inner +assert Outer.Inner.Y instanceof Outer.Inner \ No newline at end of file
