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:
committed by
Space Team
parent
1603cd11ea
commit
5b0b7c4da4
+33
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user