Files
Roman Golyshev 54cca88279 KT-50728 Enforce receiver type resolve
When stdlib is represented as a source dependency (which seems to be the
case in the `kotlin` project), it will be resolved lazily for the IDE.
Same thing can happen if someone decides to "extend" the stdlib
by declaring their declaration in the `kotlin` package

In both of those cases, we need to make sure that receiver type is fully
resolved before trying to get a `coneType` from it

N.B. To make resolve tests work, I've added a separate folder
`withAllowedKotlinPackage` to the `testData`, because in the default
test setup it is not allowed to extend the `kotlin` package by user's
definitions

^KT-50728 Fixed
2022-01-11 22:23:57 +00:00

25 lines
561 B
Plaintext
Vendored

FILE: main.kt
package test
public final class TestClass : R|kotlin/Any| {
public constructor(): R|test/TestClass| {
super<R|kotlin/Any|>()
}
public final fun test(): R|kotlin/Unit| {
<Unresolved name: extensionFun>#()
}
}
FILE: stdlibExt.kt
package kotlin
public final class MyClass : R|kotlin/Any| {
public constructor(): R|kotlin/MyClass| {
super<R|kotlin/Any|>()
}
}
public final fun R|kotlin/MyClass|.extensionFun(): R|kotlin/Unit| {
}