langtools/test/tools/javac/enum/NoFinal4.java
author duke
Wed, 05 Jul 2017 23:01:50 +0200 (2017-07-05)
changeset 44228 e46434c65a2b
parent 25437 a06886489a6c
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
25437
a06886489a6c 8046618: .out files for enum tests in tools/javac/dir
sogoel
parents: 5520
diff changeset
     2
 * @test /nodynamiccopyright/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 5097250 5087624
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary Finalize methods on enums must be compile time error
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @author Peter von der Ah\u00e9
25437
a06886489a6c 8046618: .out files for enum tests in tools/javac/dir
sogoel
parents: 5520
diff changeset
     6
 * @compile/fail/ref=NoFinal4.out -XDrawDiagnostics  NoFinal4.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
enum NoFinal4 {
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
    A, B, C;
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
    private void finalize() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
        System.err.println("FISK");
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
}