test/tools/javac/6717241/T6717241b.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/6717241/T6717241b.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,18 @@
     1.4 +/**
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug     6717241
     1.7 + * @summary some diagnostic argument is prematurely converted into a String object
     1.8 + * @author  Maurizio Cimadamore
     1.9 + * @compile/fail/ref=T6717241b.out -XDrawDiagnostics T6717241b.java
    1.10 + */
    1.11 +
    1.12 +class T6717241b {
    1.13 +    void test() {
    1.14 +        //this will generate a 'cant.resolve.location'
    1.15 +        Object o = v;
    1.16 +        //this will generate a 'cant.resolve.location.args'
    1.17 +        m1(1, "");
    1.18 +        //this will generate a 'cant.resolve.location.args.params'
    1.19 +        T6717241b.<Integer,Double>m2(1, "");
    1.20 +    }
    1.21 +}

mercurial