Update tests on decompiled text for JS
Because .kjsm files now contain all declarations from the package (contrary to the JVM decompiler which produces one file for one class/package facade), some common decompiled text tests started to behave differently on JVM and JS. Update two of them (Modifiers, ClassWithClassObject) to make results the same, copy another (TypeAliases) to JVM-/JS-specific tests with different outputs
This commit is contained in:
@@ -9,4 +9,13 @@ public val p: kotlin.Int /* compiled code */
|
||||
|
||||
public fun f(): kotlin.Unit { /* compiled code */ }
|
||||
|
||||
public fun kotlin.Int.plus(i: kotlin.Int /* = compiled code */): kotlin.Int { /* compiled code */ }
|
||||
public fun kotlin.Int.plus(i: kotlin.Int /* = compiled code */): kotlin.Int { /* compiled code */ }
|
||||
|
||||
public final class Class public constructor() {
|
||||
public final class Nested public constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
public interface Interface {
|
||||
}
|
||||
|
||||
|
||||
@@ -6,5 +6,8 @@ private var i = 2
|
||||
|
||||
fun Int.plus(i: Int = 1) = this + i
|
||||
|
||||
class ShouldNotBeVisible1
|
||||
interface ShouldNotBeVisible2
|
||||
class Class {
|
||||
class Nested
|
||||
}
|
||||
|
||||
interface Interface
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// IntelliJ API Decompiler stub source generated from a class file
|
||||
// Implementation of methods is not available
|
||||
|
||||
package test
|
||||
|
||||
@kotlin.annotation.Target public final annotation class Ann public constructor(value: kotlin.String) : kotlin.Annotation {
|
||||
public final val value: kotlin.String /* compiled code */
|
||||
}
|
||||
|
||||
public final class Outer<E, F> public constructor() {
|
||||
public final inner class Inner<G> public constructor() {
|
||||
@kotlin.Suppress public typealias TA<H> = kotlin.collections.Map<kotlin.collections.Map<E, F>, kotlin.collections.Map<G, H>>
|
||||
}
|
||||
}
|
||||
|
||||
public final class TypeAliases public constructor() {
|
||||
public final fun foo(a: dependency.A /* = () -> kotlin.Unit */, b: test.TypeAliases.B /* = (dependency.A /* = () -> kotlin.Unit */) -> kotlin.Unit */, ta: test.Outer<kotlin.String, kotlin.Double>.Inner<kotlin.Int>.TA<kotlin.Boolean> /* = kotlin.collections.Map<kotlin.collections.Map<kotlin.String, kotlin.Double>, kotlin.collections.Map<kotlin.Int, kotlin.Boolean>> */): kotlin.Unit { /* compiled code */ }
|
||||
|
||||
@kotlin.Suppress public typealias B = (dependency.A) -> kotlin.Unit
|
||||
|
||||
@test.Ann @kotlin.Suppress private typealias Parametrized<E, F> = kotlin.collections.Map<E, F>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package dependency
|
||||
|
||||
typealias A = () -> Unit
|
||||
|
||||
fun foo(a: A) {
|
||||
a.invoke()
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package test
|
||||
|
||||
import dependency.*
|
||||
import kotlin.annotation.AnnotationTarget
|
||||
|
||||
class Outer<E, F> {
|
||||
inner class Inner<G> {
|
||||
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
|
||||
typealias TA<H> = Map<Map<E, F>, Map<G, H>>
|
||||
}
|
||||
}
|
||||
|
||||
@Target(AnnotationTarget.TYPEALIAS)
|
||||
annotation class Ann(val value: String)
|
||||
|
||||
class TypeAliases {
|
||||
|
||||
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
|
||||
typealias B = (A) -> Unit
|
||||
|
||||
fun foo(a: A, b: B, ta: Outer<String, Double>.Inner<Int>.TA<Boolean>) {
|
||||
b.invoke(a)
|
||||
}
|
||||
|
||||
@Ann("OK")
|
||||
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
|
||||
private typealias Parametrized<E, F> = Map<E, F>
|
||||
}
|
||||
Reference in New Issue
Block a user