FIR initializer: don't report type mismatch on incompatible extensions
This commit suppresses type mismatch error from KT-45989
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
FILE: fakeTypeMismatchOnExtensionReference.kt
|
||||
public abstract interface IrElement : R|kotlin/Any| {
|
||||
}
|
||||
public final fun R|IrElement|.dumpKotlinLike(options: R|kotlin/String| = String()): R|kotlin/String| {
|
||||
^dumpKotlinLike String()
|
||||
}
|
||||
public final fun R|IrElement|.dump(normalizeNames: R|kotlin/Boolean| = Boolean(false)): R|kotlin/String| {
|
||||
^dump String()
|
||||
}
|
||||
public final fun foo(dumpStrategy: R|kotlin/String|): R|kotlin/Unit| {
|
||||
lval dump: R|IrElement.() -> kotlin/String| = when () {
|
||||
==(R|<local>/dumpStrategy|, String(KotlinLike)) -> {
|
||||
Q|IrElement|::R|/dumpKotlinLike|
|
||||
}
|
||||
else -> {
|
||||
Q|IrElement|::R|/dump|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
interface IrElement
|
||||
|
||||
fun IrElement.dumpKotlinLike(options: String = ""): String = ""
|
||||
fun IrElement.dump(normalizeNames: Boolean = false): String = ""
|
||||
|
||||
fun foo(dumpStrategy: String) {
|
||||
val dump: IrElement.() -> String = if (dumpStrategy == "KotlinLike") IrElement::dumpKotlinLike else IrElement::dump
|
||||
}
|
||||
Reference in New Issue
Block a user