langtools/test/tools/javac/enum/NoFinal5.java
author jjg
Wed, 29 Oct 2014 17:25:23 -0700 (2014-10-30)
changeset 27319 030080f03e4f
parent 25437 a06886489a6c
permissions -rw-r--r--
8062348: langtools tests should close file manager (group 1) Reviewed-by: darcy
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=NoFinal5.out -XDrawDiagnostics  NoFinal5.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 NoFinal5 {
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
    A, B, C;
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
    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
}