langtools/test/tools/javac/UseEnum.java
author lana
Tue, 25 Apr 2017 07:38:50 +0000
changeset 44909 b53c770dc04f
parent 26901 2c11dc81a5c8
permissions -rw-r--r--
Added tag jdk-10+1 for changeset 3a409afd3f86

/*
 * @test /nodynamiccopyright/
 * @bug 5013488
 * @summary Compiler AssertionError: com.sun.tools.javac.util.Bits.incl(Bits.java:73)
 *
 * @compile/fail/ref=UseEnum.out -XDrawDiagnostics UseEnum.java
 */

import static java.lang.System.out;

class UseEnum {
    enum Animal {cat, dog, bird, fish};
    public static void main(String args[]) {
        Animal pet;

        pet = Animal.cat;
        out.println(pet);

        for (Animal beast : beast.values())
            out.println(pet);
    }
}