KT-10667 Fix building qualified references to nested type of built-ins, e.g. Map.Entry

This commit is contained in:
Alexey Andreev
2016-03-01 16:11:44 +03:00
parent 96a7febd09
commit 550c8b12d1
3 changed files with 21 additions and 1 deletions
@@ -66,6 +66,10 @@ public class NestedTypesTest extends SingleFileTranslationTest {
checkFooBoxIsOk();
}
public void testInheritanceFromNestedBuiltIn() throws Exception {
checkFooBoxIsOk();
}
@NotNull
@Override
protected List<String> additionalJsFiles(@NotNull EcmaVersion ecmaVersion) {
@@ -553,7 +553,7 @@ public final class StaticContext {
return null;
}
if (isNativeObject(descriptor) || isBuiltin(descriptor)) {
if (isNativeObject(descriptor)) {
return null;
}
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"
}