[FIR] Add regression tests for number of issues fixed in K2
List of issues: KT-4113, KT-6822, KT-7389, KT-17817, KT-20223 KT-21463, KT-24503, KT-24737, KT-24779, KT-24901 KT-27261, KT-28668, KT-30497, KT-30756, KT-36958 KT-37365, KT-37490, KT-38288, KT-41038, KT-41721 KT-42136, KT-42169, KT-42449, KT-42715, KT-43553 KT-43603, KT-43846, KT-43936, KT-46288, KT-46301 KT-47373, KT-47484, KT-47490, KT-47495, KT-47750 KT-47815, KT-47870, KT-48975, KT-49024, KT-49045 KT-50134, KT-50160, KT-50550, KT-51045, KT-51143 KT-51796, KT-52262, KT-52424, KT-52860, KT-52934 KT-53086, KT-53494, KT-53671, KT-53752, KT-53819 KT-54478, KT-54518, KT-54931, KT-54990, KT-55138 KT-55379, KT-55555, KT-56243
This commit is contained in:
committed by
Space Team
parent
8ae5213155
commit
aef9b129d2
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
FILE: ambigousParenthesizedReference.kt
|
||||
public final fun consume(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun box(): R|kotlin/Unit| {
|
||||
^box R|/consume|(Q|kotlin/Int|::<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// ISSUE: KT-36958
|
||||
|
||||
fun consume(x: Any?) {}
|
||||
|
||||
fun box() = consume((Int::<!OVERLOAD_RESOLUTION_AMBIGUITY!>plus<!>))
|
||||
compiler/fir/analysis-tests/testData/resolve/references/incorrectReferenceOnInnerClassMember.fir.txt
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
FILE: incorrectReferenceOnInnerClassMember.kt
|
||||
package foo
|
||||
|
||||
public final class Outer<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|foo/Outer<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inner class Inner<T> : R|kotlin/Any| {
|
||||
public foo/Outer<T>.constructor(): R|foo/Outer.Inner<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun method(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|foo/Outer|.<Resolution to classifier>#(Int(42))
|
||||
Q|foo/Outer|.<Resolution to classifier>#(Int(42))::<Unresolved reference: method>#
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-37365
|
||||
|
||||
package foo
|
||||
|
||||
class Outer<T> {
|
||||
inner class Inner {
|
||||
fun method() {}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo.Outer<Int>.<!RESOLUTION_TO_CLASSIFIER!>Inner<!>(42)
|
||||
foo.Outer<Int>.<!RESOLUTION_TO_CLASSIFIER!>Inner<!>(42)::<!UNRESOLVED_REFERENCE!>method<!>
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
FILE: main.kt
|
||||
public final class KotlinInv<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|KotlinInv<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val stringVal: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|JavaInv|::R|/JavaInv.stringVal|
|
||||
Q|KotlinInv|::R|SubstitutionOverride</KotlinInv.stringVal: R|kotlin/String|>|
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// ISSUE: KT-56243
|
||||
|
||||
// FILE: JavaInv.java
|
||||
public class JavaInv<T> {
|
||||
public String getStringVal() { return "OK"; }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
class KotlinInv<T> {
|
||||
val stringVal: String = ""
|
||||
}
|
||||
|
||||
fun test() {
|
||||
JavaInv<out Number>::stringVal
|
||||
KotlinInv<out Number>::stringVal
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
FILE: unresovledReferenceInFinally.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
String(1234).R|kotlin/apply|<R|kotlin/String|>(<L> = apply@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
::<Unresolved reference: fu1>#
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// ISSUE: KT-47490
|
||||
|
||||
fun test() {
|
||||
"1234".apply {
|
||||
try {
|
||||
} finally {
|
||||
::<!UNRESOLVED_REFERENCE!>fu1<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user