Do not output empty non-root packages in tests with txt
Mostly to avoid listing every internal package in kotlin-stdlib/kotlin-reflect, as in https://github.com/JetBrains/kotlin/blob/acd5b62148d797ffd24c4811d1d663f0c1ae7885/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/conversionOfSignedToUnsigned.txt#L144
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
package
|
||||
|
||||
@[ERROR : foo] /* annotation class not found */ public fun bar(/*0*/ p: [ERROR : foo]): [ERROR : foo]
|
||||
|
||||
package foo {
|
||||
}
|
||||
|
||||
@@ -2,6 +2,3 @@ package
|
||||
|
||||
public val l: kotlin.collections.MutableList<in kotlin.Int>
|
||||
public fun test(/*0*/ l: java.util.List<kotlin.Int>): kotlin.Unit
|
||||
|
||||
package xxx {
|
||||
}
|
||||
|
||||
@@ -40,12 +40,6 @@ package a {
|
||||
// -- Module: <m3> --
|
||||
package
|
||||
|
||||
package a {
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
package test {
|
||||
public fun test(): kotlin.reflect.KFunction1<a.b.c, kotlin.Unit>
|
||||
}
|
||||
|
||||
-45
@@ -92,49 +92,4 @@ package kotlin {
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package kotlin.annotation {
|
||||
}
|
||||
|
||||
package kotlin.collections {
|
||||
}
|
||||
|
||||
package kotlin.internal {
|
||||
|
||||
package kotlin.internal.contracts {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.ranges {
|
||||
}
|
||||
|
||||
package kotlin.reflect {
|
||||
}
|
||||
|
||||
package kotlin.script {
|
||||
|
||||
package kotlin.script.dependencies {
|
||||
}
|
||||
|
||||
package kotlin.script.experimental {
|
||||
|
||||
package kotlin.script.experimental.dependencies {
|
||||
}
|
||||
|
||||
package kotlin.script.experimental.location {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.script.extensions {
|
||||
}
|
||||
|
||||
package kotlin.script.templates {
|
||||
|
||||
package kotlin.script.templates.standard {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.text {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,48 +2,6 @@ package
|
||||
|
||||
package java {
|
||||
|
||||
package java.awt {
|
||||
|
||||
package java.awt.event {
|
||||
}
|
||||
}
|
||||
|
||||
package java.beans {
|
||||
|
||||
package java.beans.beancontext {
|
||||
}
|
||||
}
|
||||
|
||||
package java.io {
|
||||
}
|
||||
|
||||
package java.lang {
|
||||
|
||||
package java.lang.annotation {
|
||||
}
|
||||
|
||||
package java.lang.reflect {
|
||||
}
|
||||
}
|
||||
|
||||
package java.net {
|
||||
}
|
||||
|
||||
package java.nio {
|
||||
|
||||
package java.nio.charset {
|
||||
}
|
||||
}
|
||||
|
||||
package java.rmi {
|
||||
}
|
||||
|
||||
package java.security {
|
||||
}
|
||||
|
||||
package java.sql {
|
||||
}
|
||||
|
||||
package java.util {
|
||||
|
||||
public open class Collection {
|
||||
@@ -53,18 +11,6 @@ package java {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package java.util.concurrent {
|
||||
|
||||
package java.util.concurrent.atomic {
|
||||
}
|
||||
|
||||
package java.util.concurrent.locks {
|
||||
}
|
||||
}
|
||||
|
||||
package java.util.regex {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,3 @@ package j {
|
||||
public open fun javaM(): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
package k {
|
||||
}
|
||||
|
||||
@@ -39,18 +39,7 @@ package k {
|
||||
}
|
||||
}
|
||||
|
||||
package k2 {
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
package k {
|
||||
}
|
||||
|
||||
package k2 {
|
||||
}
|
||||
|
||||
package k3 {
|
||||
}
|
||||
|
||||
@@ -33,9 +33,6 @@ package
|
||||
|
||||
public fun test(/*0*/ b: a.B): kotlin.Unit
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <top_m1> --
|
||||
package
|
||||
|
||||
@@ -33,9 +33,6 @@ package
|
||||
|
||||
public fun test(/*0*/ b: a.B): kotlin.Unit
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <top_m1> --
|
||||
package
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
package b {
|
||||
|
||||
public object O {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
package b {
|
||||
public fun foo(): kotlin.Int
|
||||
}
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
}
|
||||
|
||||
@@ -58,9 +58,6 @@ public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
package a {
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +70,4 @@ public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
package a {
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,3 @@ package
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ _a: a): kotlin.Unit
|
||||
public fun test3(/*0*/ _a: a): kotlin.Unit
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
@@ -44,7 +44,4 @@ package a {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -39,6 +39,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.txt
Vendored
-3
@@ -39,6 +39,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -40,6 +40,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -149,6 +149,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ m1: p.M1): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -39,6 +39,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -70,6 +70,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
@@ -48,6 +48,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: p.A): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -31,6 +31,3 @@ public final class A {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -39,6 +39,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B<kotlin.String>?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -50,6 +50,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B<p.Tr>?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun </*0*/ Y, /*1*/ Z> test(/*0*/ b: p.B<Y, Z>?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun </*0*/ Y> test(/*0*/ b: p.B<Y>?, /*1*/ y: Y): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B<kotlin.String>?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?, /*1*/ c: p.C): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -63,6 +63,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -45,6 +45,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun p.B.test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -45,6 +45,3 @@ package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test1(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -50,6 +50,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -47,6 +47,3 @@ public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test1(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test2(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test3(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -45,6 +45,3 @@ package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test1(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -57,6 +57,3 @@ package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test1(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -45,6 +45,3 @@ package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
public fun test1(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -18,6 +18,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
@@ -45,6 +45,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -63,6 +63,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?, /*1*/ a: p.G1<kotlin.Int>, /*2*/ b1: p.G2<p.B, kotlin.String>): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -51,6 +51,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-6
@@ -19,9 +19,3 @@ package
|
||||
|
||||
public fun test1(): kotlin.Int
|
||||
public fun test2(): kotlin.Int
|
||||
|
||||
package p1 {
|
||||
}
|
||||
|
||||
package p2 {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -44,6 +44,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: p.B?): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -57,6 +57,3 @@ public final class Foo : p.C, p.B {
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -50,6 +50,3 @@ public final class Foo : p.A, p.B {
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -51,6 +51,3 @@ public final class Foo : p.A, p.B {
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
-3
@@ -50,6 +50,3 @@ public final class Foo : p.A<kotlin.String>, p.B {
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-6
@@ -33,9 +33,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a: p1.A): kotlin.Unit
|
||||
public fun test(/*0*/ a: p2.A): kotlin.Unit
|
||||
|
||||
package p1 {
|
||||
}
|
||||
|
||||
package p2 {
|
||||
}
|
||||
|
||||
Vendored
-9
@@ -48,12 +48,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a: [ERROR : A]): kotlin.Unit
|
||||
public fun test(/*0*/ a: p2.A): kotlin.Unit
|
||||
|
||||
package p1 {
|
||||
}
|
||||
|
||||
package p2 {
|
||||
}
|
||||
|
||||
package p3 {
|
||||
}
|
||||
|
||||
-6
@@ -33,9 +33,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a: p1.A): kotlin.Unit
|
||||
public fun test(/*0*/ a: p2.A): kotlin.Unit
|
||||
|
||||
package p1 {
|
||||
}
|
||||
|
||||
package p2 {
|
||||
}
|
||||
|
||||
-9
@@ -48,12 +48,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a: [ERROR : A]): kotlin.Unit
|
||||
public fun test(/*0*/ a: p2.A): kotlin.Unit
|
||||
|
||||
package p1 {
|
||||
}
|
||||
|
||||
package p2 {
|
||||
}
|
||||
|
||||
package p3 {
|
||||
}
|
||||
|
||||
@@ -36,6 +36,3 @@ package p {
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
@@ -37,6 +37,3 @@ package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public inline fun testInline(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
@@ -47,6 +47,3 @@ package other {
|
||||
public fun baz(/*0*/ b: kotlin.Boolean?): kotlin.Int
|
||||
public fun foo(/*0*/ e: test.E): kotlin.Int
|
||||
}
|
||||
|
||||
package test {
|
||||
}
|
||||
|
||||
@@ -22,6 +22,3 @@ package
|
||||
package m {
|
||||
public fun main(): kotlin.Unit
|
||||
}
|
||||
|
||||
package p {
|
||||
}
|
||||
|
||||
Vendored
-6
@@ -9,9 +9,6 @@ package common {
|
||||
// -- Module: <m2-jvm> --
|
||||
package
|
||||
|
||||
package common {
|
||||
}
|
||||
|
||||
package jvm {
|
||||
public actual fun foo(): kotlin.Unit
|
||||
}
|
||||
@@ -20,9 +17,6 @@ package jvm {
|
||||
// -- Module: <m3-js> --
|
||||
package
|
||||
|
||||
package common {
|
||||
}
|
||||
|
||||
package js {
|
||||
public actual fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
-9
@@ -44,12 +44,6 @@ package
|
||||
public fun test(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
|
||||
package a {
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <top_m1> --
|
||||
package
|
||||
@@ -91,6 +85,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ _ab: a.b): kotlin.Unit
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
@@ -55,12 +55,6 @@ package
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
|
||||
package a {
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <m1> --
|
||||
package
|
||||
@@ -109,9 +103,3 @@ package
|
||||
|
||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
||||
|
||||
package a {
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,6 @@ package a {
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
package test {
|
||||
public val x: [ERROR : Type for a.b()]
|
||||
|
||||
@@ -48,9 +45,6 @@ package test {
|
||||
// -- Module: <m3> --
|
||||
package
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
package test {
|
||||
public fun foo(/*0*/ i: a.a): kotlin.Unit
|
||||
}
|
||||
|
||||
-3
@@ -38,9 +38,6 @@ package some {
|
||||
// -- Module: <m3> --
|
||||
package
|
||||
|
||||
package a {
|
||||
}
|
||||
|
||||
package other {
|
||||
public fun test(/*0*/ a_: [ERROR : a.b]): kotlin.Unit
|
||||
|
||||
|
||||
-3
@@ -8,7 +8,4 @@ package a {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package a.b {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,2 @@
|
||||
package
|
||||
|
||||
package bar {
|
||||
}
|
||||
|
||||
package foo {
|
||||
}
|
||||
|
||||
@@ -1,10 +1,2 @@
|
||||
package
|
||||
|
||||
package foo {
|
||||
|
||||
package foo.bar {
|
||||
|
||||
package foo.bar.buz {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,6 @@ package a {
|
||||
}
|
||||
}
|
||||
|
||||
package b {
|
||||
}
|
||||
|
||||
package c {
|
||||
}
|
||||
|
||||
package test {
|
||||
public val x1: kotlin.Int
|
||||
public val x3: kotlin.Int
|
||||
|
||||
@@ -14,6 +14,3 @@ package lib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package user {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,2 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
|
||||
package a.java {
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -11,6 +11,3 @@ package a {
|
||||
@kotlin.SinceKotlin(version = "1.1") public typealias Alias_1_1 = kotlin.String
|
||||
public typealias Since_1_1_Alias = a.Since_1_1
|
||||
}
|
||||
|
||||
package b {
|
||||
}
|
||||
|
||||
-3
@@ -16,9 +16,6 @@ package api {
|
||||
// -- Module: <usage> --
|
||||
package
|
||||
|
||||
package api {
|
||||
}
|
||||
|
||||
package usage {
|
||||
public fun use(): kotlin.Unit
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -16,9 +16,6 @@ package api {
|
||||
// -- Module: <usage> --
|
||||
package
|
||||
|
||||
package api {
|
||||
}
|
||||
|
||||
package usage {
|
||||
public fun use(): kotlin.Unit
|
||||
}
|
||||
|
||||
Vendored
-273
@@ -18,36 +18,6 @@ public fun test(): kotlin.Unit
|
||||
|
||||
package kotlin {
|
||||
|
||||
package kotlin.annotation {
|
||||
}
|
||||
|
||||
package kotlin.collections {
|
||||
}
|
||||
|
||||
package kotlin.comparisons {
|
||||
}
|
||||
|
||||
package kotlin.concurrent {
|
||||
}
|
||||
|
||||
package kotlin.coroutines {
|
||||
|
||||
package kotlin.coroutines.experimental {
|
||||
|
||||
package kotlin.coroutines.experimental.intrinsics {
|
||||
}
|
||||
|
||||
package kotlin.coroutines.experimental.jvm {
|
||||
|
||||
package kotlin.coroutines.experimental.jvm.internal {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.experimental {
|
||||
}
|
||||
|
||||
package kotlin.internal {
|
||||
|
||||
public final annotation class ImplicitIntegerCoercion : kotlin.Annotation {
|
||||
@@ -56,248 +26,5 @@ package kotlin {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
package kotlin.internal.contracts {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.io {
|
||||
}
|
||||
|
||||
package kotlin.jvm {
|
||||
|
||||
package kotlin.jvm.functions {
|
||||
}
|
||||
|
||||
package kotlin.jvm.internal {
|
||||
|
||||
package kotlin.jvm.internal.markers {
|
||||
}
|
||||
|
||||
package kotlin.jvm.internal.unsafe {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.math {
|
||||
}
|
||||
|
||||
package kotlin.properties {
|
||||
}
|
||||
|
||||
package kotlin.ranges {
|
||||
}
|
||||
|
||||
package kotlin.reflect {
|
||||
|
||||
package kotlin.reflect.full {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm {
|
||||
|
||||
package kotlin.reflect.jvm.internal {
|
||||
|
||||
package kotlin.reflect.jvm.internal.components {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.builtins {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.builtins.functions {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.builtins.jvm {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors.annotations {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors.deserialization {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors.impl {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.incremental {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.incremental.components {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.sources {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.kotlin {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.load.kotlin.header {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.metadata {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.metadata.builtins {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.metadata.deserialization {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.metadata.jvm {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.metadata.jvm.deserialization {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.name {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.renderer {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.calls {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.constants {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.jvm {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.scopes {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.serialization {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.serialization.deserialization {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.storage {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.types {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.types.checker {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.types.error {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.types.typeUtil {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.types.typesApproximation {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.util {
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.util.collectionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.impl.utils {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.pcollections {
|
||||
}
|
||||
|
||||
package kotlin.reflect.jvm.internal.structure {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.script {
|
||||
|
||||
package kotlin.script.dependencies {
|
||||
}
|
||||
|
||||
package kotlin.script.experimental {
|
||||
|
||||
package kotlin.script.experimental.dependencies {
|
||||
}
|
||||
|
||||
package kotlin.script.experimental.location {
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.script.extensions {
|
||||
}
|
||||
|
||||
package kotlin.script.templates {
|
||||
|
||||
package kotlin.script.templates.standard {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package kotlin.sequences {
|
||||
}
|
||||
|
||||
package kotlin.system {
|
||||
}
|
||||
|
||||
package kotlin.test {
|
||||
}
|
||||
|
||||
package kotlin.text {
|
||||
}
|
||||
}
|
||||
|
||||
+48
-26
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.test.util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Lists;
|
||||
import kotlin.Unit;
|
||||
import kotlin.text.StringsKt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
@@ -105,51 +106,58 @@ public class RecursiveDescriptorComparator {
|
||||
boolean isClassOrPackage =
|
||||
(descriptor instanceof ClassOrPackageFragmentDescriptor || descriptor instanceof PackageViewDescriptor) && !isEnumEntry;
|
||||
|
||||
if (isClassOrPackage && !topLevel) {
|
||||
printer.println();
|
||||
}
|
||||
|
||||
boolean isPrimaryConstructor = descriptor instanceof ConstructorDescriptor && ((ConstructorDescriptor) descriptor).isPrimary();
|
||||
printer.print(isPrimaryConstructor && conf.checkPrimaryConstructors ? "/*primary*/ " : "", conf.renderer.render(descriptor));
|
||||
|
||||
if (descriptor instanceof FunctionDescriptor && conf.checkFunctionContracts) {
|
||||
FunctionDescriptor functionDescriptor = (FunctionDescriptor) descriptor;
|
||||
printEffectsIfAny(functionDescriptor, printer);
|
||||
}
|
||||
|
||||
StringBuilder content = new StringBuilder();
|
||||
if (isClassOrPackage) {
|
||||
Printer child = new Printer(content, printer);
|
||||
|
||||
if (!topLevel) {
|
||||
printer.printlnWithNoIndent(" {").pushIndent();
|
||||
}
|
||||
else {
|
||||
printer.println();
|
||||
printer.println();
|
||||
child.pushIndent();
|
||||
}
|
||||
|
||||
if (descriptor instanceof ClassDescriptor) {
|
||||
ClassDescriptor klass = (ClassDescriptor) descriptor;
|
||||
appendSubDescriptors(descriptor, module,
|
||||
klass.getDefaultType().getMemberScope(), klass.getConstructors(), printer);
|
||||
appendSubDescriptors(descriptor, module, klass.getDefaultType().getMemberScope(), klass.getConstructors(), child);
|
||||
MemberScope staticScope = klass.getStaticScope();
|
||||
if (!DescriptorUtils.getAllDescriptors(staticScope).isEmpty()) {
|
||||
printer.println();
|
||||
printer.println("// Static members");
|
||||
appendSubDescriptors(descriptor, module, staticScope, Collections.emptyList(), printer);
|
||||
child.println();
|
||||
child.println("// Static members");
|
||||
appendSubDescriptors(descriptor, module, staticScope, Collections.emptyList(), child);
|
||||
}
|
||||
}
|
||||
else if (descriptor instanceof PackageFragmentDescriptor) {
|
||||
appendSubDescriptors(descriptor, module,
|
||||
((PackageFragmentDescriptor) descriptor).getMemberScope(),
|
||||
Collections.emptyList(), printer);
|
||||
Collections.emptyList(), child);
|
||||
}
|
||||
else if (descriptor instanceof PackageViewDescriptor) {
|
||||
appendSubDescriptors(descriptor, module,
|
||||
getPackageScopeInModule((PackageViewDescriptor) descriptor, module),
|
||||
Collections.emptyList(), printer);
|
||||
Collections.emptyList(), child);
|
||||
}
|
||||
|
||||
if (!topLevel) {
|
||||
printer.popIndent().println("}");
|
||||
if (child.isEmpty() && (
|
||||
descriptor instanceof PackageFragmentDescriptor || descriptor instanceof PackageViewDescriptor
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
|
||||
printer.println();
|
||||
}
|
||||
}
|
||||
|
||||
printDescriptor(descriptor, printer);
|
||||
|
||||
if (isClassOrPackage) {
|
||||
if (!topLevel) {
|
||||
printer.printlnWithNoIndent(" {");
|
||||
printer.printWithNoIndent(content);
|
||||
printer.println("}");
|
||||
}
|
||||
else {
|
||||
printer.println();
|
||||
printer.println();
|
||||
printer.printWithNoIndent(StringsKt.trimStart(content, Printer.LINE_SEPARATOR.toCharArray()));
|
||||
}
|
||||
}
|
||||
else if (conf.checkPropertyAccessors && descriptor instanceof PropertyDescriptor) {
|
||||
@@ -177,7 +185,21 @@ public class RecursiveDescriptorComparator {
|
||||
}
|
||||
}
|
||||
|
||||
private void printEffectsIfAny(FunctionDescriptor functionDescriptor, Printer printer) {
|
||||
private void printDescriptor(
|
||||
@NotNull DeclarationDescriptor descriptor,
|
||||
@NotNull Printer printer
|
||||
) {
|
||||
boolean isPrimaryConstructor = conf.checkPrimaryConstructors &&
|
||||
descriptor instanceof ConstructorDescriptor && ((ConstructorDescriptor) descriptor).isPrimary();
|
||||
|
||||
printer.print(isPrimaryConstructor ? "/*primary*/ " : "", conf.renderer.render(descriptor));
|
||||
|
||||
if (descriptor instanceof FunctionDescriptor && conf.checkFunctionContracts) {
|
||||
printEffectsIfAny((FunctionDescriptor) descriptor, printer);
|
||||
}
|
||||
}
|
||||
|
||||
private static void printEffectsIfAny(FunctionDescriptor functionDescriptor, Printer printer) {
|
||||
LazyContractProvider contractProvider = functionDescriptor.getUserData(ContractProviderKey.INSTANCE);
|
||||
if (contractProvider == null) return;
|
||||
|
||||
|
||||
@@ -118,7 +118,5 @@ abstract class AbstractTypeBindingTest : KotlinTestWithEnvironment() {
|
||||
}
|
||||
popIndent()
|
||||
}
|
||||
|
||||
override fun toString(): String = out.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,15 +24,16 @@ import java.util.Iterator;
|
||||
|
||||
public class Printer {
|
||||
private static final String DEFAULT_INDENTATION_UNIT = " ";
|
||||
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
|
||||
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
|
||||
|
||||
protected final Appendable out;
|
||||
private final Appendable out;
|
||||
private final int maxBlankLines;
|
||||
|
||||
private String indent = "";
|
||||
private String indent;
|
||||
private final String indentUnit;
|
||||
private int blankLineCountIncludingCurrent = 0;
|
||||
private boolean withholdIndentOnce = false;
|
||||
private int length = 0;
|
||||
|
||||
public Printer(@NotNull Appendable out) {
|
||||
this(out, Integer.MAX_VALUE);
|
||||
@@ -47,14 +48,25 @@ public class Printer {
|
||||
}
|
||||
|
||||
public Printer(@NotNull Appendable out, int maxBlankLines, @NotNull String indentUnit) {
|
||||
this(out, maxBlankLines, indentUnit, "");
|
||||
}
|
||||
|
||||
private Printer(@NotNull Appendable out, int maxBlankLines, @NotNull String indentUnit, @NotNull String indent) {
|
||||
this.out = out;
|
||||
this.maxBlankLines = maxBlankLines;
|
||||
this.indentUnit = indentUnit;
|
||||
this.indent = indent;
|
||||
}
|
||||
|
||||
public Printer(@NotNull Appendable out, @NotNull Printer parent) {
|
||||
this(out, parent.maxBlankLines, parent.indentUnit, parent.indent);
|
||||
}
|
||||
|
||||
private void append(Object o) {
|
||||
try {
|
||||
out.append(o.toString());
|
||||
String string = o.toString();
|
||||
out.append(string);
|
||||
length += string.length();
|
||||
}
|
||||
catch (IOException e) {
|
||||
// Do nothing
|
||||
@@ -156,4 +168,13 @@ public class Printer {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return length == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return out.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user