Make FIR multi-module tests from IDE regular FIR compiler resolve tests
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package hello
|
||||
|
||||
class Hello(val msg: String)
|
||||
|
||||
class Test(val set: java.util.Set<*>)
|
||||
@@ -1,19 +0,0 @@
|
||||
FILE: base.kt
|
||||
public final class Hello : R|kotlin/Any| {
|
||||
public constructor(msg: R|kotlin/String|): R|hello/Hello| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val msg: R|kotlin/String| = R|<local>/msg|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final class Test : R|kotlin/Any| {
|
||||
public constructor(set: R|java/util/Set<*>|): R|hello/Test| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val set: R|java/util/Set<*>| = R|<local>/set|
|
||||
public get(): R|java/util/Set<*>|
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package test
|
||||
|
||||
import hello.Hello
|
||||
|
||||
fun foo(hello: Hello): String = hello.msg
|
||||
@@ -1,4 +0,0 @@
|
||||
FILE: user.kt
|
||||
public final fun foo(hello: R|hello/Hello|): R|kotlin/String| {
|
||||
^foo R|<local>/hello|.R|hello/Hello.msg|
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class Annotated : R|kotlin/Any| {
|
||||
@R|org/jetbrains/annotations/NotNull|() public open fun foo(@R|org/jetbrains/annotations/Nullable|() param: R|kotlin/String?|): R|kotlin/String|
|
||||
|
||||
public constructor(): R|Annotated|
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Annotated {
|
||||
@NotNull
|
||||
public String foo(@Nullable String param) {
|
||||
if (param != null) return param;
|
||||
else return "";
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
class User : Annotated() {
|
||||
fun test() {
|
||||
val x = foo("123")
|
||||
val y = foo(null)
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public final class User : R|Annotated| {
|
||||
public constructor(): R|User| {
|
||||
super<R|Annotated|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/String| = this@R|/User|.R|/Annotated.foo|(String(123))
|
||||
lval y: R|kotlin/String| = this@R|/User|.R|/Annotated.foo|(Null(null))
|
||||
}
|
||||
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
public open class Annotated : R|kotlin/Any| {
|
||||
@R|org/jetbrains/annotations/NotNull|() public open fun foo(@R|org/jetbrains/annotations/Nullable|() param: R|kotlin/String?|): R|kotlin/String|
|
||||
|
||||
public constructor(): R|Annotated|
|
||||
|
||||
}
|
||||
public open class AnnotatedDerived : R|Annotated| {
|
||||
public open fun foo(param: R|kotlin/String?|): R|kotlin/String|
|
||||
|
||||
public constructor(): R|AnnotatedDerived|
|
||||
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Annotated {
|
||||
@NotNull
|
||||
public String foo(@Nullable String param) {
|
||||
if (param != null) return param;
|
||||
else return "";
|
||||
}
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
public class AnnotatedDerived extends Annotated {
|
||||
public String foo(String param) {
|
||||
return super.foo(param);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
class User : AnnotatedDerived() {
|
||||
fun test() {
|
||||
val x = foo("123")
|
||||
val y = foo(null)
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public final class User : R|AnnotatedDerived| {
|
||||
public constructor(): R|User| {
|
||||
super<R|AnnotatedDerived|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(String(123))
|
||||
lval y: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(Null(null))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
public open class Some : R|kotlin/Any| {
|
||||
public constructor(): R|Some|
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
public class Some {
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
|
||||
class A : Some()
|
||||
@@ -1,7 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public final class A : R|Some| {
|
||||
public constructor(): R|A| {
|
||||
super<R|Some|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class A<T : R|ft<kotlin/Any, kotlin/Any?>!|> : R|kotlin/Any| {
|
||||
public open fun foo(t: R|ft<T, T?>!|): R|ft<T, T?>!|
|
||||
|
||||
public constructor<T : R|ft<kotlin/Any, kotlin/Any?>!|>(): R|A<T>|
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
public class A<T> {
|
||||
public T foo(T t) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
|
||||
class Some
|
||||
|
||||
class B : A<Some>() {
|
||||
fun test() {
|
||||
foo(Some())
|
||||
}
|
||||
}
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
FILE: simpleFakeOverride.kt
|
||||
public final class Some : R|kotlin/Any| {
|
||||
public constructor(): R|Some| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class B : R|A<Some>| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A<Some>|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/B|.R|FakeOverride</B.foo: R|ft<Some, Some?>!|>|(R|/Some.Some|())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
public open class Some : R|kotlin/Any| {
|
||||
public open fun foo(param: R|kotlin/Int|): R|kotlin/Boolean|
|
||||
|
||||
public open fun bar(arr: R|ft<kotlin/IntArray, kotlin/IntArray?>!|): R|ft<kotlin/Array<ft<kotlin/String, kotlin/String?>!>, kotlin/Array<out ft<kotlin/String, kotlin/String?>!>?>!|
|
||||
|
||||
public constructor(): R|Some|
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
public class Some {
|
||||
public boolean foo(int param) {
|
||||
return param > 0;
|
||||
}
|
||||
|
||||
public String[] bar(int[] arr) {
|
||||
String[] result = new String[arr.length];
|
||||
int i = 0;
|
||||
for (int elem: arr) {
|
||||
result[i++] = elem;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
class A : Some() {
|
||||
fun test() {
|
||||
val res1 = foo(1)
|
||||
val res2 = foo(-1)
|
||||
val res3 = bar(intArrayOf(0, 2, -2))
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public final class A : R|Some| {
|
||||
public constructor(): R|A| {
|
||||
super<R|Some|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval res1: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(1))
|
||||
lval res2: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(1).R|kotlin/Int.unaryMinus|())
|
||||
lval res3: R|ft<kotlin/Array<ft<kotlin/String, kotlin/String?>!>, kotlin/Array<out ft<kotlin/String, kotlin/String?>!>?>!| = this@R|/A|.R|/Some.bar|(R|kotlin/intArrayOf|(vararg(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|())))
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
This file is just to keep parent directory alive.
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class Base : R|kotlin/Any| {
|
||||
public open field value:
|
||||
|
||||
public constructor(): R|Base|
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
public class Base {
|
||||
public int value = 0;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
class Derived : Base() {
|
||||
fun getValue() = value
|
||||
|
||||
fun foo() = value
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
FILE: Derived.kt
|
||||
public final class Derived : R|Base| {
|
||||
public constructor(): R|Derived| {
|
||||
super<R|Base|>()
|
||||
}
|
||||
|
||||
public final fun getValue(): R|kotlin/Int| {
|
||||
^getValue this@R|/Derived|.R|/Base.value|
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|/Derived|.R|/Base.value|
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
public abstract interface Diagnostic : R|kotlin/Any| {
|
||||
}
|
||||
public abstract interface DiagnosticWithParameters1<E : R|ft<kotlin/Any, kotlin/Any?>!|, A : R|ft<kotlin/Any, kotlin/Any?>!|> : R|jvm/Diagnostic| {
|
||||
public abstract fun getA(): R|ft<A, A?>!|
|
||||
|
||||
}
|
||||
public abstract interface DiagnosticWithParameters2<E : R|ft<kotlin/Any, kotlin/Any?>!|, A : R|ft<kotlin/Any, kotlin/Any?>!|, B : R|ft<kotlin/Any, kotlin/Any?>!|> : R|jvm/Diagnostic| {
|
||||
public abstract fun getA(): R|ft<A, A?>!|
|
||||
|
||||
public abstract fun getB(): R|ft<B, B?>!|
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
package jvm;
|
||||
|
||||
public interface Diagnostic {}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package jvm;
|
||||
|
||||
public interface DiagnosticWithParameters1<E, A> extends Diagnostic {
|
||||
A getA();
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
package jvm;
|
||||
|
||||
public interface DiagnosticWithParameters2<E, A, B> extends Diagnostic {
|
||||
A getA();
|
||||
B getB();
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package jvm;
|
||||
|
||||
fun <K> select(x: K, y: K): K = x
|
||||
|
||||
fun test(d1: DiagnosticWithParameters1<*, *>, d2: DiagnosticWithParameters2<*, *, *>) {
|
||||
val res = select(d1.a, d2.b)
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
FILE: test.kt
|
||||
public final fun <K> select(x: R|K|, y: R|K|): R|K| {
|
||||
^select R|<local>/x|
|
||||
}
|
||||
public final fun test(d1: R|jvm/DiagnosticWithParameters1<*, *>|, d2: R|jvm/DiagnosticWithParameters2<*, *, *>|): R|kotlin/Unit| {
|
||||
lval res: R|ft<kotlin/Any, kotlin/Any?>!| = R|jvm/select|<R|ft<kotlin/Any, kotlin/Any?>!|>(R|<local>/d1|.R|jvm/DiagnosticWithParameters1.a|, R|<local>/d2|.R|jvm/DiagnosticWithParameters2.b|)
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
public open class JavaClass : R|kotlin/Any| {
|
||||
public open fun getText(): R|ft<kotlin/String, kotlin/String?>!|
|
||||
|
||||
public open fun getText(param: R|ft<kotlin/String, kotlin/String?>!|): R|ft<kotlin/String, kotlin/String?>!|
|
||||
|
||||
public constructor(): R|JavaClass|
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
public class JavaClass {
|
||||
public String getText() {
|
||||
return "Text";
|
||||
}
|
||||
|
||||
public String getText(String param) {
|
||||
return "Text with " + param;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
fun test() {
|
||||
val jc = JavaClass()
|
||||
val result = jc.text
|
||||
}
|
||||
|
||||
fun otherTest(jc: JavaClass) {
|
||||
val result = jc.text
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
FILE: Test.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval jc: R|JavaClass| = R|/JavaClass.JavaClass|()
|
||||
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/jc|.R|/JavaClass.text|
|
||||
}
|
||||
public final fun otherTest(jc: R|JavaClass|): R|kotlin/Unit| {
|
||||
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/jc|.R|/JavaClass.text|
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
public open class JavaClass : R|Derived| {
|
||||
public constructor(): R|JavaClass|
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
open class Base {
|
||||
open val some: String get() = "Base"
|
||||
}
|
||||
|
||||
open class Derived : Base() {
|
||||
override val some: String get() = "Derived"
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
FILE: Base.kt
|
||||
public open class Base : R|kotlin/Any| {
|
||||
public constructor(): R|Base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public open val some: R|kotlin/String|
|
||||
public get(): R|kotlin/String| {
|
||||
^ String(Base)
|
||||
}
|
||||
|
||||
}
|
||||
public open class Derived : R|Base| {
|
||||
public constructor(): R|Derived| {
|
||||
super<R|Base|>()
|
||||
}
|
||||
|
||||
public open override val some: R|kotlin/String|
|
||||
public get(): R|kotlin/String| {
|
||||
^ String(Derived)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
public class JavaClass extends Derived {
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
fun test() {
|
||||
val jc = JavaClass()
|
||||
val result = jc.some
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
FILE: Test.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval jc: R|JavaClass| = R|/JavaClass.JavaClass|()
|
||||
lval result: R|kotlin/String| = R|<local>/jc|.R|/Derived.some|
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class Inheritor : R|Second| {
|
||||
public open fun R|First|.foo(first: R|kotlin/String|, s: R|kotlin/Int|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|Inheritor|
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
interface First
|
||||
|
||||
open class Second {
|
||||
open fun First.foo(s: String, i: Int) {}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
FILE: Base.kt
|
||||
public abstract interface First : R|kotlin/Any| {
|
||||
}
|
||||
public open class Second : R|kotlin/Any| {
|
||||
public constructor(): R|Second| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public open fun R|First|.foo(s: R|kotlin/String|, i: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
public class Inheritor extends Second {
|
||||
public void foo(First first, String s, int i) {}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
class Tester : Inheritor(), First {
|
||||
fun test() {
|
||||
foo("abc", 456)
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
FILE: Test.kt
|
||||
public final class Tester : R|Inheritor|, R|First| {
|
||||
public constructor(): R|Tester| {
|
||||
super<R|Inheritor|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
(this@R|/Tester|, this@R|/Tester|).R|/Inheritor.foo|(String(abc), Int(456))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class Inheritor : R|kotlin/Any|, R|Base| {
|
||||
public open fun getX(): R|kotlin/Int|
|
||||
|
||||
public constructor(): R|Inheritor|
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
interface Base {
|
||||
val x: Int
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
FILE: Base.kt
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
public abstract val x: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
public class Inheritor implements Base {
|
||||
public int getX() {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
class Tester : Inheritor() {
|
||||
fun test(): Int {
|
||||
return x
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
FILE: Test.kt
|
||||
public final class Tester : R|Inheritor| {
|
||||
public constructor(): R|Tester| {
|
||||
super<R|Inheritor|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Int| {
|
||||
^test this@R|/Tester|.R|/Inheritor.x|
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public open class Some : R|kotlin/Any|, R|Strange<kotlin/Any?>| {
|
||||
public open fun foo(): R|kotlin/Any?|
|
||||
|
||||
public constructor(): R|Some|
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
class Derived : Some()
|
||||
@@ -1,7 +0,0 @@
|
||||
FILE: Derived.kt
|
||||
public final class Derived : R|Some| {
|
||||
public constructor(): R|Derived| {
|
||||
super<R|Some|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
public class Some implements Strange {
|
||||
public Object foo() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
interface Strange<out T> {
|
||||
fun foo(): T
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
FILE: Strange.kt
|
||||
public abstract interface Strange<out T> : R|kotlin/Any| {
|
||||
public abstract fun foo(): R|T|
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
public/*package*/ open class JavaClass : R|kotlin/Any| {
|
||||
public open fun getFoo(): R|ft<kotlin/String, kotlin/String?>!|
|
||||
|
||||
public/*package*/ constructor(): R|JavaClass|
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class JavaClass {
|
||||
public String getFoo() { return null; }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
val x = JavaClass().foo
|
||||
@@ -1,3 +0,0 @@
|
||||
FILE: Test.kt
|
||||
public final val x: R|ft<kotlin/String, kotlin/String?>!| = R|/JavaClass.JavaClass|().R|/JavaClass.foo|
|
||||
public get(): R|ft<kotlin/String, kotlin/String?>!|
|
||||
@@ -1,11 +0,0 @@
|
||||
expect open class A<T>() {
|
||||
open fun foo(arg: T)
|
||||
}
|
||||
open class B : A<String>() {
|
||||
// Fake: override fun foo(arg: String) = super.foo(arg)
|
||||
// Fake (JVM only): override fun bar(arg: String): String = super.bar(arg)
|
||||
}
|
||||
open class C : B() {
|
||||
open fun bar(arg: String): String = arg
|
||||
open fun baz(arg: CharSequence): String = arg.toString()
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
FILE: common.kt
|
||||
public open expect class A<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|A<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public open fun foo(arg: R|T|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public open class B : R|A<kotlin/String>| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A<kotlin/String>|>()
|
||||
}
|
||||
|
||||
}
|
||||
public open class C : R|B| {
|
||||
public constructor(): R|C| {
|
||||
super<R|B|>()
|
||||
}
|
||||
|
||||
public open fun bar(arg: R|kotlin/String|): R|kotlin/String| {
|
||||
^bar R|<local>/arg|
|
||||
}
|
||||
|
||||
public open fun baz(arg: R|kotlin/CharSequence|): R|kotlin/String| {
|
||||
^baz R|<local>/arg|.R|kotlin/Any.toString|()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
actual open class A<T> {
|
||||
actual open fun foo(arg: T) {}
|
||||
open fun bar(arg: T): T = arg
|
||||
open fun baz(arg: T): T = arg
|
||||
}
|
||||
class D : C() {
|
||||
fun test() {
|
||||
foo("")
|
||||
bar("") // should be resolved to just C.bar
|
||||
baz("")
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public open actual class A<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|A<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public open actual fun foo(arg: R|T|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public open fun bar(arg: R|T|): R|T| {
|
||||
^bar R|<local>/arg|
|
||||
}
|
||||
|
||||
public open fun baz(arg: R|T|): R|T| {
|
||||
^baz R|<local>/arg|
|
||||
}
|
||||
|
||||
}
|
||||
public final class D : R|C| {
|
||||
public constructor(): R|D| {
|
||||
super<R|C|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/D|.R|FakeOverride</B.foo: R|kotlin/Unit|>|(String())
|
||||
this@R|/D|.R|/C.bar|(String())
|
||||
this@R|/D|.R|FakeOverride</B.baz: R|kotlin/String|>|(String())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
expect class MyList {
|
||||
fun get(i: Int): Int
|
||||
}
|
||||
|
||||
open class Wrapper(val list: MyList)
|
||||
@@ -1,18 +0,0 @@
|
||||
FILE: common.kt
|
||||
public final expect class MyList : R|kotlin/Any| {
|
||||
public constructor(): R|MyList| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun get(i: R|kotlin/Int|): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public open class Wrapper : R|kotlin/Any| {
|
||||
public constructor(list: R|MyList|): R|Wrapper| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val list: R|MyList| = R|<local>/list|
|
||||
public get(): R|MyList|
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
actual class MyList {
|
||||
actual fun get(i: Int): Int = i
|
||||
|
||||
fun set(i: Int, v: Int) {}
|
||||
}
|
||||
|
||||
class DerivedList : MyList() {
|
||||
fun useMember() {
|
||||
get(1)
|
||||
set(2, 3)
|
||||
}
|
||||
}
|
||||
|
||||
fun useList(list: MyList) {
|
||||
// We should deal with receiver to resolve this
|
||||
list.get(1)
|
||||
list.set(2, 3)
|
||||
}
|
||||
|
||||
class DerivedWrapper : Wrapper() {
|
||||
fun use() {
|
||||
// We should deal with receiver to resolve this
|
||||
list.get(1)
|
||||
list.set(2, 3)
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public final actual class MyList : R|kotlin/Any| {
|
||||
public constructor(): R|MyList| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final actual fun get(i: R|kotlin/Int|): R|kotlin/Int| {
|
||||
^get R|<local>/i|
|
||||
}
|
||||
|
||||
public final fun set(i: R|kotlin/Int|, v: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class DerivedList : R|MyList| {
|
||||
public constructor(): R|DerivedList| {
|
||||
super<R|MyList|>()
|
||||
}
|
||||
|
||||
public final fun useMember(): R|kotlin/Unit| {
|
||||
this@R|/DerivedList|.R|/MyList.get|(Int(1))
|
||||
this@R|/DerivedList|.R|/MyList.set|(Int(2), Int(3))
|
||||
}
|
||||
|
||||
}
|
||||
public final fun useList(list: R|MyList|): R|kotlin/Unit| {
|
||||
R|<local>/list|.R|/MyList.get|(Int(1))
|
||||
R|<local>/list|.R|/MyList.set|(Int(2), Int(3))
|
||||
}
|
||||
public final class DerivedWrapper : R|Wrapper| {
|
||||
public constructor(): R|DerivedWrapper| {
|
||||
super<R|Wrapper|>()
|
||||
}
|
||||
|
||||
public final fun use(): R|kotlin/Unit| {
|
||||
this@R|/DerivedWrapper|.R|/Wrapper.list|.R|/MyList.get|(Int(1))
|
||||
this@R|/DerivedWrapper|.R|/Wrapper.list|.R|/MyList.set|(Int(2), Int(3))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
expect open class A() {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
open class B : A()
|
||||
@@ -1,15 +0,0 @@
|
||||
FILE: common.kt
|
||||
public open expect class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public open class B : R|A| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
actual open class A {
|
||||
actual fun foo() {}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
class C : B() {
|
||||
fun test() {
|
||||
foo()
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
class D : A() {
|
||||
fun test() {
|
||||
foo()
|
||||
bar()
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public open actual class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final actual fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class C : R|B| {
|
||||
public constructor(): R|C| {
|
||||
super<R|B|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/C|.R|/A.foo|()
|
||||
this@R|/C|.R|/A.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
public final class D : R|A| {
|
||||
public constructor(): R|D| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/D|.R|/A.foo|()
|
||||
this@R|/D|.R|/A.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
expect open class A() {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
open class B : A()
|
||||
@@ -1,15 +0,0 @@
|
||||
FILE: common.kt
|
||||
public open expect class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public open class B : R|A| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
abstract class X {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
interface Y {
|
||||
fun baz() {}
|
||||
}
|
||||
|
||||
actual open class A : X(), Y {
|
||||
actual fun foo() {}
|
||||
}
|
||||
|
||||
class C : B() {
|
||||
fun test() {
|
||||
foo()
|
||||
bar()
|
||||
baz()
|
||||
}
|
||||
}
|
||||
|
||||
class D : A() {
|
||||
fun test() {
|
||||
foo()
|
||||
bar()
|
||||
baz()
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
FILE: jvm.kt
|
||||
public abstract class X : R|kotlin/Any| {
|
||||
public constructor(): R|X| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface Y : R|kotlin/Any| {
|
||||
public open fun baz(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public open actual class A : R|X|, R|Y| {
|
||||
public constructor(): R|A| {
|
||||
super<R|X|>()
|
||||
}
|
||||
|
||||
public final actual fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class C : R|B| {
|
||||
public constructor(): R|C| {
|
||||
super<R|B|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/C|.R|/A.foo|()
|
||||
this@R|/C|.R|/X.bar|()
|
||||
this@R|/C|.R|/Y.baz|()
|
||||
}
|
||||
|
||||
}
|
||||
public final class D : R|A| {
|
||||
public constructor(): R|D| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/D|.R|/A.foo|()
|
||||
this@R|/D|.R|/X.bar|()
|
||||
this@R|/D|.R|/Y.baz|()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun foo(): R|ft<A, A?>!|
|
||||
|
||||
public open fun bar(): R|ft<A, A?>!|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
public class A {
|
||||
public A foo() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public A bar() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class B : A() {
|
||||
override fun foo(): B = this
|
||||
fun bar(): B = this // Here we should have "missing override" but no ambiguity
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
bar()
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
FILE: B.kt
|
||||
public final class B : R|A| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|B| {
|
||||
^foo this@R|/B|
|
||||
}
|
||||
|
||||
public final fun bar(): R|B| {
|
||||
^bar this@R|/B|
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
this@R|/B|.R|/B.foo|()
|
||||
this@R|/B|.R|/B.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
val someList = listOf(1, 2, 3)
|
||||
@@ -1,3 +0,0 @@
|
||||
FILE: Some.kt
|
||||
public final val someList: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(vararg(Int(1), Int(2), Int(3)))
|
||||
public get(): R|kotlin/collections/List<kotlin/Int>|
|
||||
Reference in New Issue
Block a user