[FIR TEST]: add test with Map.Entry-based J/K hierarchy

This commit is contained in:
Mikhail Glukhikh
2019-11-29 16:01:35 +03:00
parent 8a601b5a0e
commit 8bcae80877
3 changed files with 41 additions and 0 deletions
@@ -0,0 +1,23 @@
// FILE: Test.java
import java.lang.*;
import java.util.*;
public class Test {
public static class MapEntryImpl implements Map.Entry<String, String> {
public String getKey() { return null; }
public String getValue() { return null; }
public String setValue(String s) { return null; }
}
}
// FILE: main.kt
class MyMapEntry : Test.MapEntryImpl()
fun test() {
val b = MyMapEntry()
b.key
b.value
b.setValue(null)
}
@@ -0,0 +1,13 @@
FILE: main.kt
public final class MyMapEntry : R|Test.MapEntryImpl| {
public constructor(): R|MyMapEntry| {
super<R|Test.MapEntryImpl|>()
}
}
public final fun test(): R|kotlin/Unit| {
lval b: R|MyMapEntry| = R|/MyMapEntry.MyMapEntry|()
R|<local>/b|.R|/Test.MapEntryImpl.key|
R|<local>/b|.R|/Test.MapEntryImpl.value|
R|<local>/b|.R|/Test.MapEntryImpl.setValue|(Null(null))
}
@@ -489,6 +489,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
runTest("compiler/fir/resolve/testData/resolve/stdlib/j+k/LoggerInstance.kt");
}
@TestMetadata("MapEntry.kt")
public void testMapEntry() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/j+k/MapEntry.kt");
}
@TestMetadata("MyException.kt")
public void testMyException() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/j+k/MyException.kt");