KT-57206: Add diagnostics test

Problem described in KT-57206 seems to have been fixed by KT-56506. This
 commit adds code example from KT-57206 as a diagnostics test.

^KT-57206 Fixed
This commit is contained in:
Stanislav Ruban
2023-03-10 13:41:35 +02:00
committed by Space Team
parent 1603cd11ea
commit 5b0b7c4da4
5 changed files with 57 additions and 0 deletions
@@ -0,0 +1,33 @@
// FIR_IDENTICAL
// FILE: TableView.java
import java.util.Collection;
public class TableView<Item> {
public Collection<Item> getSelection() { return null; }
public void setSelection(Collection<Item> selection) {}
}
// FILE: JavaTableView.java
import java.util.List;
public class JavaTableView<Item> extends TableView<Item> {
@Override public List<Item> getSelection() { return null; }
}
// FILE: main.kt
class KotlinTableView<Item>: TableView<Item>() {
override fun getSelection(): List<Item>? { return null }
}
fun foo(
javaTable: JavaTableView<String>,
kotlinTable: KotlinTableView<String>,
selection: ArrayList<String>
) {
javaTable.selection = selection
kotlinTable.selection = selection
}