--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8187978/FilterOutCandidatesForDiagnosticsTest.java Mon Oct 02 10:04:22 2017 -0700
@@ -0,0 +1,18 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8187978
+ * @summary javac can show overload error messages that include non-valid candidates
+ * @compile/fail/ref=FilterOutCandidatesForDiagnosticsTest.out -XDrawDiagnostics FilterOutCandidatesForDiagnosticsTest.java
+ */
+
+import java.util.*;
+
+class FilterOutCandidatesForDiagnosticsTest {
+ void test() {
+ make(new ArrayList<String>(), new ArrayList<Integer>()).add("");
+ }
+
+ <Z> Z make(Z z1, Z z2) {
+ return null;
+ }
+}