KT-10667 Fix building qualified references to nested type of built-ins, e.g. Map.Entry
This commit is contained in:
@@ -66,6 +66,10 @@ public class NestedTypesTest extends SingleFileTranslationTest {
|
|||||||
checkFooBoxIsOk();
|
checkFooBoxIsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testInheritanceFromNestedBuiltIn() throws Exception {
|
||||||
|
checkFooBoxIsOk();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
protected List<String> additionalJsFiles(@NotNull EcmaVersion ecmaVersion) {
|
protected List<String> additionalJsFiles(@NotNull EcmaVersion ecmaVersion) {
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ public final class StaticContext {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNativeObject(descriptor) || isBuiltin(descriptor)) {
|
if (isNativeObject(descriptor)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ClassDescriptor cls = (ClassDescriptor) descriptor;
|
ClassDescriptor cls = (ClassDescriptor) descriptor;
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
class EntryImplementor() : Map.Entry<String, String> {
|
||||||
|
override val key: String
|
||||||
|
get() = "foo"
|
||||||
|
override val value: String
|
||||||
|
get() = "bar"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val entry = EntryImplementor()
|
||||||
|
var stringResult = "${entry.key}${entry.value}"
|
||||||
|
if (stringResult != "foobar") return "failed1: $stringResult"
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user