1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/T8029569/VarargsAmbiguityCrashTest.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,19 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8029569 8037379 1.7 + * @summary internal javac cast exception when resolving varargs ambiguity 1.8 + * fix for JDK-8029569 doesn't cover all possible cases 1.9 + * @compile/fail/ref=VarargsAmbiguityCrashTest.out -XDrawDiagnostics VarargsAmbiguityCrashTest.java 1.10 + */ 1.11 + 1.12 +public class VarargsAmbiguityCrashTest { 1.13 + void m1() { 1.14 + m2(null, new Exception()); 1.15 + } 1.16 + 1.17 + void m2(Long l) {} 1.18 + 1.19 + void m2(Exception... exception) {} 1.20 + 1.21 + void m2(Long l, Exception... exception) {} 1.22 +}