From 69e1b8d4072cd83a46066561af82369b893466c7 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 23 Jul 2012 19:38:03 +0400 Subject: [PATCH] More test data for LR --- .../inference/regressions/kt1029.txt | 9 ++++++++ .../inference/regressions/kt1031.txt | 9 ++++++++ .../inference/regressions/kt1558.txt | 7 +++++++ .../inference/regressions/kt1944.txt | 12 +++++++++++ .../inference/regressions/kt2179.txt | 12 +++++++++++ .../inference/regressions/kt2294.txt | 9 ++++++++ .../inference/regressions/kt2320.txt | 13 ++++++++++++ .../inference/regressions/kt2324.txt | 11 ++++++++++ .../SenselessNullInWhen.txt | 7 +++++++ .../override/AllPrivateFromSuperTypes.txt | 18 ++++++++++++++++ .../override/AllProtectedFromSupertypes.txt | 18 ++++++++++++++++ .../ProtectedAndPrivateFromSupertypes.txt | 21 +++++++++++++++++++ 12 files changed, 146 insertions(+) create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1029.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1031.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1558.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1944.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2179.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2294.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2320.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2324.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/nullabilityAndAutoCasts/SenselessNullInWhen.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/override/AllPrivateFromSuperTypes.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/override/AllProtectedFromSupertypes.txt create mode 100644 compiler/testData/lazyResolve/diagnostics/override/ProtectedAndPrivateFromSupertypes.txt diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1029.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1029.txt new file mode 100644 index 00000000000..10075b87a47 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1029.txt @@ -0,0 +1,9 @@ +namespace + +// +namespace i + +internal final fun a(): jet.Tuple0 +public final fun from(/*0*/ yielder: jet.Function0>): jet.Iterable +public final fun jet.Iterable.where(/*0*/ predicate: jet.Function1): jet.Function0> +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1031.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1031.txt new file mode 100644 index 00000000000..d6e50340391 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1031.txt @@ -0,0 +1,9 @@ +namespace + +// +namespace i + +internal final fun a(): jet.Tuple0 +public final fun select(/*0*/ yielder: jet.Function0>, /*1*/ selector: jet.Function1): jet.Function0> +public final fun jet.Iterable.where(/*0*/ predicate: jet.Function1): jet.Function0> +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1558.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1558.txt new file mode 100644 index 00000000000..cc4c96b8e70 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1558.txt @@ -0,0 +1,7 @@ +namespace + +// +namespace j + +internal final fun testArrays(/*0*/ ci: java.util.List, /*1*/ cii: java.util.List): jet.Tuple0 +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1944.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1944.txt new file mode 100644 index 00000000000..679a551affd --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt1944.txt @@ -0,0 +1,12 @@ +namespace + +// +namespace j + +internal final class j.P : jet.Any { + public final /*constructor*/ fun (): j.P + internal final fun foo(): jet.Tuple0 + internal final var x: jet.Int private set +} +internal final fun run(/*0*/ f: jet.Function0): T +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2179.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2179.txt new file mode 100644 index 00000000000..af4d5d2d1ad --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2179.txt @@ -0,0 +1,12 @@ +namespace + +// +namespace i + +internal final val java.util.Collection.size: jet.Int +internal final fun arrayList(/*0*/ vararg values: T /*jet.Array*/): java.util.ArrayList +internal final fun java.util.Collection.map(/*0*/ transform: jet.Function1): java.util.List +internal final fun >java.util.Collection.mapTo(/*0*/ result: C, /*1*/ transform: jet.Function1): C +internal final fun test(): jet.Tuple0 +internal final fun >jet.Array.toCollection(/*0*/ result: C): C +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2294.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2294.txt new file mode 100644 index 00000000000..54abbabfb66 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2294.txt @@ -0,0 +1,9 @@ +namespace + +// +namespace a + +internal final fun array(/*0*/ vararg t: T /*jet.Array*/): jet.Array +public final fun foo(/*0*/ array: jet.Array): jet.Array +public final fun test(): jet.Tuple0 +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2320.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2320.txt new file mode 100644 index 00000000000..a2c6daa97bf --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2320.txt @@ -0,0 +1,13 @@ +namespace + +// +namespace i + +internal abstract trait i.Entry : jet.Any { + internal abstract fun getValue(): B +} +internal abstract trait i.NotMap : jet.Any { +} +internal final fun i.NotMap.mapValuesOnly(/*0*/ f: jet.Function1): i.NotMap +internal final fun i.NotMap.mapValuesOriginal(/*0*/ ff: jet.Function1, R>): i.NotMap +// diff --git a/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2324.txt b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2324.txt new file mode 100644 index 00000000000..7e2d2afeca9 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/inference/regressions/kt2324.txt @@ -0,0 +1,11 @@ +namespace + +// +namespace i + +internal final fun arrayList(/*0*/ vararg values: T /*jet.Array*/): java.util.ArrayList +internal final fun assertEquals(/*0*/ expected: jet.Any?, /*1*/ actual: jet.Any?, /*2*/ message: jet.String = ?): jet.Tuple0 +internal final fun someFunction(/*0*/ list: java.util.List, /*1*/ transform: jet.Function1): java.util.List +internal final fun testSomeFunction(): jet.Tuple0 +internal final fun >jet.Array.toCollection(/*0*/ result: C): C +// diff --git a/compiler/testData/lazyResolve/diagnostics/nullabilityAndAutoCasts/SenselessNullInWhen.txt b/compiler/testData/lazyResolve/diagnostics/nullabilityAndAutoCasts/SenselessNullInWhen.txt new file mode 100644 index 00000000000..7247d94fdd7 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/nullabilityAndAutoCasts/SenselessNullInWhen.txt @@ -0,0 +1,7 @@ +namespace + +// +namespace kt2457 + +internal final fun foo(/*0*/ i: jet.Int): jet.Int +// diff --git a/compiler/testData/lazyResolve/diagnostics/override/AllPrivateFromSuperTypes.txt b/compiler/testData/lazyResolve/diagnostics/override/AllPrivateFromSuperTypes.txt new file mode 100644 index 00000000000..3f9a2e7febf --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/override/AllPrivateFromSuperTypes.txt @@ -0,0 +1,18 @@ +namespace + +// +namespace test + +internal abstract trait test.A : jet.Any { + private open val a: jet.String +} +internal open class test.C : jet.Any { + public final /*constructor*/ fun (): test.C + private final val a: jet.String +} +internal final class test.Subject : test.C, test.A { + public final /*constructor*/ fun (): test.Subject + invisible_fake abstract override /*2*/ val a: jet.String private get + internal final val c: jet.String +} +// diff --git a/compiler/testData/lazyResolve/diagnostics/override/AllProtectedFromSupertypes.txt b/compiler/testData/lazyResolve/diagnostics/override/AllProtectedFromSupertypes.txt new file mode 100644 index 00000000000..f3aba8f3ae1 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/override/AllProtectedFromSupertypes.txt @@ -0,0 +1,18 @@ +namespace + +// +namespace test + +internal abstract trait test.A : jet.Any { + protected abstract val a: jet.String +} +internal open class test.C : jet.Any { + public final /*constructor*/ fun (): test.C + protected final val a: jet.String +} +internal final class test.Subject : test.C, test.A { + public final /*constructor*/ fun (): test.Subject + protected final override /*2*/ val a: jet.String + internal final val c: jet.String +} +// diff --git a/compiler/testData/lazyResolve/diagnostics/override/ProtectedAndPrivateFromSupertypes.txt b/compiler/testData/lazyResolve/diagnostics/override/ProtectedAndPrivateFromSupertypes.txt new file mode 100644 index 00000000000..cb032b3c9b1 --- /dev/null +++ b/compiler/testData/lazyResolve/diagnostics/override/ProtectedAndPrivateFromSupertypes.txt @@ -0,0 +1,21 @@ +namespace + +// +namespace test + +internal abstract trait test.A : jet.Any { + protected abstract val a: jet.String +} +internal abstract trait test.B : jet.Any { + protected abstract val a: jet.String +} +internal open class test.C : jet.Any { + public final /*constructor*/ fun (): test.C + private final val a: jet.String +} +internal final class test.Subject : test.C, test.A, test.B { + public final /*constructor*/ fun (): test.Subject + private abstract override /*2*/ val a: jet.String + internal final val c: jet.String +} +//