langtools/test/tools/javac/generics/PrimitiveVariant.java
author hseigel
Wed, 02 Mar 2016 23:48:41 +0000
changeset 36397 c487ced7231c
parent 30721 1024d425d97e
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
30721
1024d425d97e 8074425: Group 13b: golden files for tests in tools/javac/generics dir
sogoel
parents: 7681
diff changeset
     2
 * @test /nodynamiccopyright/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 4471667
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary compiler allows overriding with different primitive return type
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @author gafter
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 *
30721
1024d425d97e 8074425: Group 13b: golden files for tests in tools/javac/generics dir
sogoel
parents: 7681
diff changeset
     7
 * @compile/fail/ref=PrimitiveVariant.out -XDrawDiagnostics  PrimitiveVariant.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
5011
428dd17fdb26 6931127: strange test class files
jjg
parents: 2985
diff changeset
    10
package PrimitiveVariant;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
interface I {
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
    double m();
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
}
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
abstract class J {
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
    int m() { return 2; }
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
}
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
class Main extends J implements I {
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
    public short m() { return 1; }
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
}