Add tests to preserve current behavior for upcoming changes
##KT-30983 In Progress
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: test/jv/JavaSample.java
|
||||
|
||||
package test.jv;
|
||||
|
||||
public class JavaSample {
|
||||
public static void member() {}
|
||||
}
|
||||
|
||||
// FILE: foo.kt
|
||||
|
||||
package test.kot
|
||||
|
||||
typealias JavaAlias = test.jv.JavaSample
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
import test.kot.JavaAlias
|
||||
import test.kot.JavaAlias.member
|
||||
|
||||
fun foo(
|
||||
sample: <!UNRESOLVED_REFERENCE!>JavaSample<!>,
|
||||
alias: JavaAlias
|
||||
) {
|
||||
member()
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ sample: [ERROR : JavaSample], /*1*/ alias: test.kot.JavaAlias /* = test.jv.JavaSample */): kotlin.Unit
|
||||
|
||||
package test {
|
||||
|
||||
package test.jv {
|
||||
|
||||
public open class JavaSample {
|
||||
public constructor JavaSample()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public open fun member(): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
package test.kot {
|
||||
public typealias JavaAlias = test.jv.JavaSample
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
|
||||
// FILE: foo.kt
|
||||
|
||||
package test
|
||||
|
||||
typealias ClassAlias = ClassSample
|
||||
typealias ObjectAlias = ObjectSample
|
||||
typealias EnumAlias = EnumSample
|
||||
|
||||
class ClassSample {
|
||||
class Nested1
|
||||
}
|
||||
|
||||
object ObjectSample {
|
||||
class Nested2
|
||||
}
|
||||
|
||||
enum class EnumSample {
|
||||
Entry;
|
||||
|
||||
class Nested3
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
import test.ClassAlias
|
||||
import test.ClassAlias.Nested1
|
||||
|
||||
import test.ClassSample.Nested1.*
|
||||
import test.ClassAlias.<!UNRESOLVED_REFERENCE!>Nested1<!>.*
|
||||
|
||||
import test.ObjectAlias
|
||||
import test.ObjectAlias.Nested2
|
||||
|
||||
import test.ObjectSample.Nested2.*
|
||||
import test.ObjectAlias.<!UNRESOLVED_REFERENCE!>Nested2<!>.*
|
||||
|
||||
import test.EnumAlias
|
||||
import test.EnumAlias.Nested3
|
||||
|
||||
import test.EnumSample.Nested3.*
|
||||
import test.EnumAlias.<!UNRESOLVED_REFERENCE!>Nested3<!>.*
|
||||
|
||||
import test.EnumAlias.Entry
|
||||
|
||||
fun f() {}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package
|
||||
|
||||
public fun f(): kotlin.Unit
|
||||
|
||||
package test {
|
||||
|
||||
public final class ClassSample {
|
||||
public constructor ClassSample()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested1 {
|
||||
public constructor Nested1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final enum class EnumSample : kotlin.Enum<test.EnumSample> {
|
||||
enum entry Entry
|
||||
|
||||
private constructor EnumSample()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.EnumSample): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.EnumSample!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested3 {
|
||||
public constructor Nested3()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumSample
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumSample>
|
||||
}
|
||||
|
||||
public object ObjectSample {
|
||||
private constructor ObjectSample()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested2 {
|
||||
public constructor Nested2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
public typealias ClassAlias = test.ClassSample
|
||||
public typealias EnumAlias = test.EnumSample
|
||||
public typealias ObjectAlias = test.ObjectSample
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
|
||||
// FILE: foo.kt
|
||||
|
||||
package test
|
||||
|
||||
typealias ClassAlias = ClassSample
|
||||
typealias ObjectAlias = ObjectSample
|
||||
typealias EnumAlias = EnumSample
|
||||
|
||||
class ClassSample {
|
||||
class Nested {
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
object ObjectSample {
|
||||
class Nested {
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
enum class EnumSample {
|
||||
Entry;
|
||||
|
||||
class Nested {
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
fun func() {}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun foo(
|
||||
a0: test.ClassSample.Nested,
|
||||
a1: test.ClassAlias.<!UNRESOLVED_REFERENCE!>Nested<!>,
|
||||
|
||||
b0: test.ObjectSample.Nested,
|
||||
b1: test.ObjectAlias.<!UNRESOLVED_REFERENCE!>Nested<!>,
|
||||
|
||||
c0: test.EnumSample.Nested,
|
||||
c1: test.EnumAlias.<!UNRESOLVED_REFERENCE!>Nested<!>
|
||||
) {
|
||||
test.ClassSample::Nested
|
||||
test.ClassAlias::<!UNRESOLVED_REFERENCE!>Nested<!>
|
||||
|
||||
test.ClassSample::func
|
||||
test.ClassAlias::func
|
||||
|
||||
test.ClassSample.Nested::func
|
||||
test.ClassAlias.<!UNRESOLVED_REFERENCE!>Nested<!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>func<!>
|
||||
|
||||
test.ObjectSample::Nested
|
||||
test.ObjectAlias::Nested
|
||||
|
||||
test.ObjectSample::func
|
||||
test.ObjectAlias::func
|
||||
|
||||
test.ObjectSample.Nested::func
|
||||
test.ObjectAlias.<!UNRESOLVED_REFERENCE!>Nested<!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>func<!>
|
||||
|
||||
test.EnumSample::Nested
|
||||
test.EnumAlias::<!UNRESOLVED_REFERENCE!>Nested<!>
|
||||
|
||||
test.EnumSample::func
|
||||
test.EnumAlias::func
|
||||
|
||||
test.EnumSample.Nested::func
|
||||
test.EnumAlias.<!UNRESOLVED_REFERENCE!>Nested<!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>func<!>
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ a0: test.ClassSample.Nested, /*1*/ a1: [ERROR : test.ClassAlias.Nested], /*2*/ b0: test.ObjectSample.Nested, /*3*/ b1: [ERROR : test.ObjectAlias.Nested], /*4*/ c0: test.EnumSample.Nested, /*5*/ c1: [ERROR : test.EnumAlias.Nested]): kotlin.Unit
|
||||
|
||||
package test {
|
||||
|
||||
public final class ClassSample {
|
||||
public constructor ClassSample()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final enum class EnumSample : kotlin.Enum<test.EnumSample> {
|
||||
enum entry Entry
|
||||
|
||||
private constructor EnumSample()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.EnumSample): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final fun func(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.EnumSample!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumSample
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumSample>
|
||||
}
|
||||
|
||||
public object ObjectSample {
|
||||
private constructor ObjectSample()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun func(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
public typealias ClassAlias = test.ClassSample
|
||||
public typealias EnumAlias = test.EnumSample
|
||||
public typealias ObjectAlias = test.ObjectSample
|
||||
}
|
||||
Reference in New Issue
Block a user