|
Groovy example source code file (GroovyInnerEnumBug.groovy)
The Groovy GroovyInnerEnumBug.groovy source codepackage groovy.bugs class GroovyInnerEnumBug extends GroovyTestCase { static public enum MyEnum { a, b, c public static MyEnum[] myenums = [a, b, c]; } // GROOVY-3979 void testEnumInsideAClass3979() { assertScript """ class EnumTest2 { enum Direction3979 { North, East, South, West } static void main(args) { for (d in Direction3979) { assert d instanceof Direction3979 } } } """ } // GROOVY-3994 void testEnumInsideAClass3994() { assert MyEnum.a.name() == 'a' assertTrue Enum.isAssignableFrom(MyEnum.class) assert EnumSet.allOf(MyEnum.class) instanceof EnumSet } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy GroovyInnerEnumBug.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.