From 997e26d11e750288fd5c9684df39c2c7c2eee5f3 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Fri, 23 Nov 2012 16:05:42 +0400 Subject: [PATCH] Test for KT-2890 # KT-2890 can't reproduce --- .../testData/diagnostics/tests/j+k/kt2890.kt | 20 +++++++++++++++++++ .../checkers/JetDiagnosticsTestGenerated.java | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/j+k/kt2890.kt diff --git a/compiler/testData/diagnostics/tests/j+k/kt2890.kt b/compiler/testData/diagnostics/tests/j+k/kt2890.kt new file mode 100644 index 00000000000..d4667aaef3a --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/kt2890.kt @@ -0,0 +1,20 @@ +//FILE:_03_collections/CollectionTest.java +package _03_collections; + +import java.util.List; + +public class CollectionTest { + public static void add(List ints) { + ints.add(5); + } +} + +//FILE:n.kt +package _03_collections + +import java.util.ArrayList + +fun test() { + val c = CollectionTest() + CollectionTest.add(ArrayList()) +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index c36f2eef8ba..dd17ae05e62 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -2242,6 +2242,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage doTest("compiler/testData/diagnostics/tests/j+k/kt2641.kt"); } + @TestMetadata("kt2890.kt") + public void testKt2890() throws Exception { + doTest("compiler/testData/diagnostics/tests/j+k/kt2890.kt"); + } + @TestMetadata("mutableIterator.kt") public void testMutableIterator() throws Exception { doTest("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt");