langtools/test/tools/javac/6717241/T6717241a.java
author smarks
Wed, 25 May 2016 13:38:35 -0700
changeset 38567 6d4c5a278fff
parent 6150 d055fa8ced62
permissions -rw-r--r--
8133977: add specification for serialized forms Reviewed-by: chegar, plevart, scolebourne

/**
 * @test /nodynamiccopyright/
 * @bug     6717241
 * @summary some diagnostic argument is prematurely converted into a String object
 * @author  Maurizio Cimadamore
 * @compile/fail/ref=T6717241a.out -XDrawDiagnostics T6717241a.java
 */

class T6717241a<X extends Object & java.io.Serializable> {
    X x;
    void test() {
        //this will generate a 'cant.resolve'
        Object o = x.v;
        //this will generate a 'cant.resolve.args'
        x.m1(1, "");
        //this will generate a 'cant.resolve.args.params'
        x.<Integer,Double>m2(1, "");
    }
}