[FIR] Consider extension receiver type in conflicting members checker

This commit is contained in:
Dmitriy Novozhilov
2021-08-05 14:24:08 +03:00
committed by TeamCityServer
parent cd09c8ba51
commit a9882a86c0
7 changed files with 61 additions and 1 deletions
@@ -0,0 +1,21 @@
FILE: sameValueParametersDifferentReceiver.kt
public open class A : R|kotlin/Any| {
public constructor(): R|A| {
super<R|kotlin/Any|>()
}
public final fun R|kotlin/String|.foo(from: R|kotlin/String|, to: R|kotlin/String|): R|kotlin/Int| {
^foo Int(1)
}
public final fun <T> R|T|.foo(from: R|kotlin/String|, to: R|kotlin/String|): R|kotlin/Int| {
^foo Int(1)
}
}
public final class B : R|A| {
public constructor(): R|B| {
super<R|A|>()
}
}
@@ -0,0 +1,11 @@
open class A {
fun String.foo(from: String, to: String): Int {
return 1
}
fun <T> T.foo(from: String, to: String): Int {
return 1
}
}
class B : A()