Fix decompilation of types based on local classifiers

If deserializing a type with arguments based on a local class for
decompiler, then just return Any type (without arguments).

Previously Any constructor was used with serialized arguments, that lead
to exception

Note that in case of deserialization for compiler nothing changes about
local-classes-based types (LocalClassifierResolverImpl is just inlined)

 #KT-13408 Fixed
This commit is contained in:
Denis Zharkov
2016-08-31 18:56:59 +03:00
parent 1be3b9c192
commit 86c1dbe7b5
15 changed files with 73 additions and 70 deletions
@@ -0,0 +1,8 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
public final class LocalClassAsTypeWithArgument<E> public constructor() {
private final val z: kotlin.Any /* compiled code */
}
@@ -0,0 +1,8 @@
package test
class LocalClassAsTypeWithArgument<E> {
// anonymous type captures type parameter E of containing class
private val z = object : Iterable<E> {
override fun iterator() = null!!
}
}
@@ -0,0 +1,2 @@
// See KT-13691
// TARGET_BACKEND: JVM