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:
@@ -0,0 +1,13 @@
|
||||
// IntelliJ API Decompiler stub source generated from a class file
|
||||
// Implementation of methods is not available
|
||||
|
||||
package test
|
||||
|
||||
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