Rename test data folder: libraries -> decompiler

This commit is contained in:
Pavel V. Talanov
2014-10-31 18:12:19 +03:00
parent d2d9813e12
commit 5fb4f41030
61 changed files with 17 additions and 17 deletions
@@ -0,0 +1,10 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
kotlin.data dependency.A dependency.B dependency.C internal final class Annotations() {
kotlin.inline dependency.A dependency.B dependency.C internal final val p: kotlin.Int /* compiled code */
kotlin.inline dependency.A dependency.B dependency.C internal final fun f(dependency.A dependency.B dependency.C kotlin.deprecated i: kotlin.Int): kotlin.Unit { /* compiled code */ }
}
@@ -0,0 +1,11 @@
package test
import dependency.*
data A("a") B(1) C class Annotations {
inline A("f") B(2) C fun f(A("i") B(3) C deprecated("1") i: Int) {
}
inline A("p") B(3) C val p: Int = 2
}
@@ -0,0 +1,5 @@
package dependency
annotation class A(val s: String)
annotation class B(val i: Int)
annotation class C
@@ -0,0 +1,24 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal final class ClassWithClassObject() {
internal class object {
internal final val a: test.A /* compiled code */
public final var b: test.B /* compiled code */
internal final val kotlin.Int.g: kotlin.Int /* compiled code */
internal final fun <T, K, G> complexFun(a: T, b: K, c: G): G { /* compiled code */ }
internal final fun f(): kotlin.Unit { /* compiled code */ }
private final fun privateFun(): kotlin.Unit { /* compiled code */ }
internal final fun kotlin.Int.f(): kotlin.Unit { /* compiled code */ }
}
internal final fun f(): kotlin.Unit { /* compiled code */ }
}
@@ -0,0 +1,34 @@
package test
class ClassWithClassObject {
fun f() {
}
class object {
fun f() {
}
fun Int.f() {
}
private fun privateFun() {
}
val a: A = A()
public var b: B = B()
val Int.g: Int
get() = this + 2
fun <T, K, G> complexFun(a: T, b: K, c: G): G {
throw AssertionError()
}
}
}
class B {
}
class A {
}
@@ -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 DependencyOnNestedClasses() : dependency.D.Nested {
internal final fun f(nc: dependency.D.NestedInClassObject, i: dependency.D.Inner, ii: dependency.D.Inner.Inner, nn: dependency.D.Nested.Nested): dependency.D.Nested { /* compiled code */ }
}
@@ -0,0 +1,14 @@
package dependency
class D {
inner class Inner {
inner class Inner
}
open class Nested {
class Nested
}
class object {
class NestedInClassObject
}
}
@@ -0,0 +1,9 @@
package test
import dependency.*
public class DependencyOnNestedClasses : D.Nested() {
fun f(nc: D.NestedInClassObject, i: D.Inner, ii: D.Inner.Inner, nn: D.Nested.Nested): D.Nested {
return D.Nested()
}
}
@@ -0,0 +1,12 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
public final enum class Enum() : kotlin.Enum<test.Enum>, dependency.Tr {
ONE
THREE
TWO
}
@@ -0,0 +1,6 @@
package dependency
trait Tr {
fun f() {
}
}
@@ -0,0 +1,12 @@
package test
import dependency.*
public enum class Enum : Tr {
ONE
TWO
THREE {
fun g() {
}
}
}
@@ -0,0 +1,12 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal abstract class FlexibleTypes() {
internal abstract val p: kotlin.Int? /* platform type */
internal abstract fun collection(): kotlin.List<kotlin.Any> /* platform type */
internal final fun withBody(): kotlin.Int? /* platform type */ { /* compiled code */ }
}
@@ -0,0 +1,11 @@
package test
import kotlin.internal.flexible.ft
abstract class FlexibleTypes() {
abstract fun collection(): ft<List<Int>, List<Any>>
abstract val p: ft<Int, Int?>
fun withBody(): ft<Int, Int?> { return 1 }
}
@@ -0,0 +1,3 @@
package kotlin.internal.flexible
class ft<L, U>
@@ -0,0 +1,14 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal final class FunctionTypes() {
public final fun <A> (A.(A) -> A)?.bar(): kotlin.Unit { /* compiled code */ }
public final fun <IP, R, P1> ((IP) -> R).compose(f: (P1) -> IP): (P1) -> R { /* compiled code */ }
public final fun <IP, R, P1> ((IP) -> R).compose2(f: (P1) -> IP): (P1) -> R { /* compiled code */ }
public final fun <A> (A.(A) -> A).foo(): kotlin.Unit { /* compiled code */ }
}
@@ -0,0 +1,17 @@
package test
class FunctionTypes {
public fun<IP, R, P1> Function1<IP, R>.compose(f: (P1) -> IP): (P1) -> R {
return {(p1: P1) -> this(f(p1)) }
}
public fun<IP, R, P1> ((IP) -> R).compose2(f: (P1) -> IP) : (P1) -> R {
return {(p1: P1) -> this(f(p1)) }
}
public fun <A> (A.(A) -> A).foo() {
}
public fun <A> (A.(A) -> A)?.bar() {
}
}
@@ -0,0 +1,28 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal final class NestedClasses() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
public final inner class Inner() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
private final inner class II() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
}
}
private final class Nested() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
internal final inner class NI() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
}
public final class NN() {
internal final fun f(): kotlin.Unit { /* compiled code */ }
}
}
}
@@ -0,0 +1,31 @@
package test
class NestedClasses {
fun f() {
}
private class Nested {
fun f() {
}
public class NN {
fun f() {
}
}
inner class NI {
fun f() {
}
}
}
public inner class Inner {
fun f() {
}
private inner class II {
fun f() {
}
}
}
}
@@ -0,0 +1,16 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal object Object {
internal final val kotlin.Int.g: kotlin.Int /* compiled code */
internal final fun <T, K, G> complexFun(a: T, b: K, c: G): G { /* compiled code */ }
internal final fun f(): kotlin.Unit { /* compiled code */ }
private final fun privateFun(): kotlin.Unit { /* compiled code */ }
internal final fun kotlin.Int.f(): kotlin.Unit { /* compiled code */ }
}
@@ -0,0 +1,19 @@
package test
object Object {
fun f() {
}
fun Int.f() {
}
private fun privateFun() {
}
val Int.g: Int
get() = this + 2
fun <T, K, G> complexFun(a: T, b: K, c: G): G {
throw AssertionError()
}
}
@@ -0,0 +1,22 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
internal abstract class SimpleClass() : dependency.D<dependency.Tr, kotlin.Int>, dependency.Tr, kotlin.List<kotlin.String> {
internal final val a: dependency.A /* compiled code */
public final var b: dependency.B /* compiled code */
internal final val kotlin.Int.g: kotlin.Int /* compiled code */
internal final fun <T, K, G> complexFun(a: T, b: K, c: G): G { /* compiled code */ }
internal final fun f(): kotlin.Unit { /* compiled code */ }
internal final fun g(d: dependency.D<kotlin.String, dependency.Tr>): kotlin.List<dependency.D<dependency.A, kotlin.Int>> { /* compiled code */ }
private final fun privateFun(): kotlin.Unit { /* compiled code */ }
internal final fun kotlin.Int.f(): kotlin.Unit { /* compiled code */ }
}
@@ -0,0 +1,13 @@
package dependency
class B {
}
class A {
}
open class D<T, G> {
}
trait Tr {
}
@@ -0,0 +1,29 @@
package test
import dependency.*
abstract class SimpleClass: D<Tr, Int>(), Tr, List<String> {
fun f() {
}
fun g(d: D<String, Tr>): List<D<A, Int>> {
throw AssertionError()
}
fun Int.f() {
}
private fun privateFun() {
}
val a: A = A()
public var b: B = B()
val Int.g: Int
get() = this + 2
fun <T, K, G> complexFun(a: T, b: K, c: G): G {
throw AssertionError()
}
}
@@ -0,0 +1,13 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package test
private var i: kotlin.Int /* compiled code */
internal val p: kotlin.Int /* compiled code */
internal fun f(): kotlin.Unit { /* compiled code */ }
internal fun kotlin.Int.plus(i: kotlin.Int): kotlin.Int { /* compiled code */ }
@@ -0,0 +1,10 @@
package test
fun f() {}
val p = 3
private var i = 2
fun Int.plus(i: Int) = this + i
class ShouldNotBeVisible1
trait ShouldNotBeVisible2
@@ -0,0 +1,46 @@
package test
trait T {
fun foo() {
}
fun boo()
}
trait TT : T {
}
fun f() {
var i = 0
val myAnonymousFunction = {
++i
}
fun myLocalFunction() {
i++
}
class MyLocalClass {
}
val myAnonymousObject = object {
}
val lambda = { }
val samWrapper = Thread(lambda)
val samLambda = Thread { }
val callableReference = Any::toString
}
class A {
class B {
class C {
}
}
inner class C {
}
}
@@ -0,0 +1,7 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public abstract class AbstractClass() {
}]]
@@ -0,0 +1,22 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public abstract class ClassWithAbstractAndOpenMembers() {
[public abstract val abstractVal: kotlin.String]
[public abstract var abstractVar: kotlin.String]
[public open val openVal: kotlin.String] /* compiled code */
[public open val openValWithGetter: kotlin.String] /* compiled code */
[public open var openVar: kotlin.String] /* compiled code */
[public open var openVarWithGetter: kotlin.String] /* compiled code */
[public abstract fun abstractFun(): kotlin.Unit]
[public open fun openFun(): kotlin.Unit { /* compiled code */ }]
}]]
@@ -0,0 +1,8 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final class ClassWithConstructor(a: kotlin.String, b: kotlin.Any) {
[internal final val a: kotlin.String] /* compiled code */
}]]
@@ -0,0 +1,14 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final enum class Color(rgb: kotlin.Int) : kotlin.Enum<testData.libraries.Color> {
[internal final val rgb: kotlin.Int] /* compiled code */
[[BLUE]]
[[GREEN]]
[[RED]]
}]]
@@ -0,0 +1,38 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[public val globalVal: testData.libraries.Pair<kotlin.Int, kotlin.String>] /* compiled code */
[public val globalValWithGetter: kotlin.Long] /* compiled code */
[public val kotlin.Int.exProp: kotlin.Int] /* compiled code */
[public val kotlin.String.exProp: kotlin.String] /* compiled code */
[public val <T> testData.libraries.Pair<T, T>.exProp: kotlin.String] /* compiled code */
[public fun <T : kotlin.CharSequence> funWithTypeParam(t: T): kotlin.Unit { /* compiled code */ }]
[public fun <T : kotlin.Number> funWithTypeParam(t: T): kotlin.Unit { /* compiled code */ }]
[public fun func(): kotlin.Unit { /* compiled code */ }]
[public fun func(cs: kotlin.CharSequence): kotlin.Unit { /* compiled code */ }]
[public fun func(a: kotlin.Int, b: kotlin.Int): kotlin.Unit { /* compiled code */ }]
[public fun func(a: kotlin.Int, b: kotlin.String = /* compiled code */): kotlin.Unit { /* compiled code */ }]
[public fun func(str: kotlin.String): kotlin.Unit { /* compiled code */ }]
[public fun <T> genericFunc(): T { /* compiled code */ }]
[public fun main(args: kotlin.Array<kotlin.String>): kotlin.Unit { /* compiled code */ }]
[public fun processDouble(d: kotlin.Double): kotlin.Unit { /* compiled code */ }]
[public fun processDouble(d: testData.libraries.Double): kotlin.Unit { /* compiled code */ }]
[kotlin.inline public fun <T> T.filter(predicate: (T) -> kotlin.Boolean): T? { /* compiled code */ }]
@@ -0,0 +1,8 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public object NamedObject {
[public final val objectMember: kotlin.Int] /* compiled code */
}]]
@@ -0,0 +1,7 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final class SimpleClass() {
}]]
@@ -0,0 +1,7 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[public trait SimpleTrait {
}]
@@ -0,0 +1,7 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final class SimpleTraitImpl() : testData.libraries.SimpleTrait {
}]]
@@ -0,0 +1,16 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final class WithInnerAndObject() {
[[public class object {
[internal final fun foo(): kotlin.Unit { /* compiled code */ }]
}]]
[[internal final class MyInner() {
[internal trait MyInnerInner {
[internal abstract fun innerInnerMethod(): kotlin.Unit]
}]
}]]
}]]
@@ -0,0 +1,9 @@
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package testData.libraries
[[public final class WithTraitClassObject() {
[[public class object : testData.libraries.SimpleTrait {
}]]
}]]
@@ -0,0 +1,3 @@
package a
class Foo
@@ -0,0 +1,6 @@
package b
import a.*
fun doSomething(f: Foo, t: Thread, s: String) {
}
@@ -0,0 +1,6 @@
package testData.libraries
import kotlin as gogland
public fun func(str : gogland.String) {
}
@@ -0,0 +1,121 @@
package testData.libraries
public trait SimpleTrait {
}
public class SimpleClass {
}
public class SimpleTraitImpl : SimpleTrait {
}
public class WithInnerAndObject {
class object {
fun foo() {
}
}
class MyInner {
trait MyInnerInner {
fun innerInnerMethod()
}
}
}
public class WithTraitClassObject {
class object : SimpleTrait
}
public abstract class AbstractClass {
}
public object NamedObject {
public val objectMember: Int = 1
}
public enum class Color(val rgb : Int) {
RED : Color(0xFF0000)
GREEN : Color(0x00FF00)
BLUE : Color(0x0000FF)
}
public abstract class ClassWithAbstractAndOpenMembers {
public abstract fun abstractFun()
public open fun openFun() {
}
public abstract val abstractVal : String
public open val openVal : String = ""
public open val openValWithGetter : String
get() {
return "239"
}
public abstract var abstractVar : String
public open var openVar : String = ""
public open var openVarWithGetter : String
get() {
return "239"
}
set(value) {
}
}
public class ClassWithConstructor(val a: String, b: Any)
public fun main(args : Array<String>) {
}
public val globalVal : Pair<Int, String> = Pair(239, "239")
public val globalValWithGetter : Long
get() {
return System.currentTimeMillis()
}
public val String.exProp : String
get() {
return this
}
public val Int.exProp : Int
get() {
return this
}
public class Pair<A, B>(val first: A, val second: B)
public val <T> Pair<T, T>.exProp : String
get() {
return "${this.first} : ${this.second}"
}
public fun func(a : Int, b : String = "55") {
}
public fun func(a : Int, b : Int) {
}
public fun func() {
}
public fun func(cs : CharSequence) {
}
public fun <T> genericFunc() : T = throw Exception()
public inline fun <T> T.filter(predicate: (T)-> Boolean) : T? = this
public class Double
public fun processDouble(d: Double) {}
public fun processDouble(d: kotlin.Double) {}
public fun <T: CharSequence> funWithTypeParam(t: T) {
}
public fun <T: Number> funWithTypeParam(t: T) {
}
@@ -0,0 +1,9 @@
import testData.libraries.*
fun foo() {
WithInnerAndObject.foo()
}
// main.kt
// class <1>object {
// fun <2>foo() {
@@ -0,0 +1,6 @@
import testData.libraries.*
val x: ClassWithConstructor = ClassWithConstructor("abc", 239)
// main.kt
//public class <1><2>ClassWithConstructor(val a: String, b: Any)
@@ -0,0 +1,8 @@
import testData.libraries.*
val color: Color? = Color.RED
val rgb = color?.rgb
// main.kt
//public enum class <1><2>Color(val <4>rgb : Int) {
// <3>RED : Color(0xFF0000)
@@ -0,0 +1,7 @@
import testData.libraries.*
val v = 5.filter { it % 2 == 1 }
// main.kt
//public inline fun <T> T.<1>filter(predicate: (T)-> Boolean) : T? = this
@@ -0,0 +1,22 @@
import testData.libraries.*
fun foo() {
println("".exProp)
val p = Pair(1, 2)
println(p.exProp)
}
// main.kt
//public val String.<1>exProp : String
//get() {
// return this
//}
//
//public val Int.exProp : Int
//get() {
// return this
//}
//
//public class <2>Pair<A, B>(val first: A, val second: B)
//
//public val <T> Pair<T, T>.<3>exProp : String
@@ -0,0 +1,8 @@
import testData.libraries.*
fun test() {
genericFunc<String>()
}
// main.kt
//public fun <T> <1>genericFunc() : T = throw Exception()
@@ -0,0 +1,9 @@
import testData.libraries.*
fun test() {
val s : String = genericFunc()
}
// main.kt
//public fun <T> <1>genericFunc() : T = throw Exception()
@@ -0,0 +1,17 @@
import testData.libraries.*
fun foo() {
func(5)
func(5, "5")
func(5, 5)
func()
}
// main.kt
//public fun <1><2>func(a : Int, b : String = "55") {
//}
//
//public fun <3>func(a : Int, b : Int) {
//}
//
//public fun <4>func() {
@@ -0,0 +1,11 @@
import testData.libraries.*
fun foo() {
println(testData.libraries.globalVal)
println(globalValWithGetter)
}
// main.kt
//public val <1>globalVal : Pair<Int, String> = Pair(239, "239")
//
//public val <2>globalValWithGetter : Long
@@ -0,0 +1,7 @@
import testData.libraries.*
val x = NamedObject.objectMember
// main.kt
//public object <1>NamedObject {
// public val <2>objectMember: Int = 1
@@ -0,0 +1,12 @@
import testData.libraries.*
fun main(args: Array<String>) {
funWithTypeParam(1)
funWithTypeParam("")
}
// main.kt
//public fun <T: CharSequence> <2>funWithTypeParam(t: T) {
//}
//
//public fun <T: Number> <1>funWithTypeParam(t: T) {
@@ -0,0 +1,22 @@
import testData.libraries.*
fun foo(a : ClassWithAbstractAndOpenMembers) {
a.abstractVar = "v"
println(a.abstractVar)
}
// main.kt
//public abstract class <1>ClassWithAbstractAndOpenMembers {
// public abstract fun abstractFun()
// public open fun openFun() {
// }
//
// public abstract val abstractVal : String
// public open val openVal : String = ""
// public open val openValWithGetter : String
// get() {
// return "239"
// }
//
// public abstract var <2><3>abstractVar : String
@@ -0,0 +1,11 @@
import testData.libraries.*
fun foo() {
func("5")
func(5)
}
// extra.kt
//public fun <1>func(str : gogland.String) {
// main.kt
//public fun <2>func(a : Int, b : String = "55") {
@@ -0,0 +1,13 @@
import testData.libraries.*
fun foo() {
processDouble(1.0);
processDouble(Double())
}
// main.kt
//public class <3>Double
//
//public fun <2>processDouble(d: Double) {}
//
//public fun <1>processDouble(d: kotlin.Double) {}