Drop AbstractLazyResolveRecursiveComparingTest test
Test data from compiler/testData/lazyResolve/ was moved to diagnostics tests
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// FILE: propertyClassFileDependencyRecursion.kt
|
||||
package test
|
||||
|
||||
import other.prop
|
||||
|
||||
// Note: "prop" is expected to be unresolved and replaced to Any
|
||||
class PropType: <!UNRESOLVED_REFERENCE!>prop<!>
|
||||
|
||||
// Note: this time "prop" should be resolved and type should be inferred for "checkTypeProp"
|
||||
val checkTypeProp = prop
|
||||
|
||||
// FILE: propertyClassFileDependencyRecursionOther.kt
|
||||
package other
|
||||
|
||||
import test.PropType
|
||||
|
||||
val prop: PropType? = null
|
||||
@@ -0,0 +1,16 @@
|
||||
package
|
||||
|
||||
package other {
|
||||
internal val prop: test.PropType? = null
|
||||
}
|
||||
|
||||
package test {
|
||||
internal val checkTypeProp: test.PropType? = null
|
||||
|
||||
internal final class PropType {
|
||||
public constructor PropType()
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// FILE: SameClassNameResolveTest.kt
|
||||
package test
|
||||
|
||||
open class Base
|
||||
class SubBase: Base()
|
||||
|
||||
// FILE: SameClassNameResolveRoot.kt
|
||||
|
||||
open class Base
|
||||
class SubBase: Base()
|
||||
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
internal open class Base {
|
||||
public constructor Base()
|
||||
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
|
||||
}
|
||||
|
||||
internal final class SubBase : Base {
|
||||
public constructor SubBase()
|
||||
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
|
||||
}
|
||||
|
||||
package test {
|
||||
|
||||
internal open class Base {
|
||||
public constructor Base()
|
||||
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
|
||||
}
|
||||
|
||||
internal final class SubBase : test.Base {
|
||||
public constructor SubBase()
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// FILE: a.kt
|
||||
package test
|
||||
|
||||
class A {}
|
||||
|
||||
// FILE: b.kt
|
||||
package test.p; class C {fun f() {}}
|
||||
|
||||
// FILE: c.kt
|
||||
package test.p; open class G<T> {open fun f(): T {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!> fun a() {}}
|
||||
|
||||
// FILE: d.kt
|
||||
package test.p; class G2<E> : <!SUPERTYPE_NOT_INITIALIZED!>G<E><!> { fun g() : E {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!> override fun f() : E {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>}
|
||||
|
||||
// FILE: e.kt
|
||||
package test.p; fun foo() {}
|
||||
|
||||
// FILE: f.kt
|
||||
package test.p; fun foo(<!UNUSED_PARAMETER!>a<!>: C) {}
|
||||
@@ -0,0 +1,43 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal final class A {
|
||||
public constructor A()
|
||||
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
|
||||
}
|
||||
|
||||
package test.p {
|
||||
internal fun foo(): kotlin.Unit
|
||||
internal fun foo(/*0*/ a: test.p.C): kotlin.Unit
|
||||
|
||||
internal final class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun f(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal open class G</*0*/ T> {
|
||||
public constructor G</*0*/ T>()
|
||||
internal final fun a(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open fun f(): T
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal final class G2</*0*/ E> : test.p.G<E> {
|
||||
public constructor G2</*0*/ E>()
|
||||
internal final override /*1*/ /*fake_override*/ fun a(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open override /*1*/ fun f(): E
|
||||
internal final fun g(): E
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
annotation class A(val a: Int = 12, val b: String = "Test", val c: String)
|
||||
|
||||
A(a = 12, c = "Hello")
|
||||
object SomeObject
|
||||
@@ -0,0 +1,28 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ..., /*2*/ c: kotlin.String)
|
||||
internal final val a: kotlin.Int
|
||||
internal final val b: kotlin.String
|
||||
internal final val c: kotlin.String
|
||||
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
|
||||
}
|
||||
|
||||
test.A(a = IntegerValueType(12): IntegerValueType(12), c = "Hello": kotlin.String) internal object SomeObject {
|
||||
private constructor SomeObject()
|
||||
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 class object <class-object-for-SomeObject> : test.SomeObject {
|
||||
private constructor <class-object-for-SomeObject>()
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
|
||||
// object as property (method tries to resolve annotations too).
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>BadAnnotation<!>
|
||||
object SomeObject
|
||||
|
||||
val some = SomeObject
|
||||
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal val some: test.SomeObject
|
||||
|
||||
[ERROR : BadAnnotation]() internal object SomeObject {
|
||||
private constructor SomeObject()
|
||||
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 class object <class-object-for-SomeObject> : test.SomeObject {
|
||||
private constructor <class-object-for-SomeObject>()
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
BadAnnotation(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
object SomeObject
|
||||
|
||||
val some = SomeObject
|
||||
|
||||
annotation class BadAnnotation(val s: String)
|
||||
@@ -0,0 +1,27 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal val some: test.SomeObject
|
||||
|
||||
internal final annotation class BadAnnotation : kotlin.Annotation {
|
||||
public constructor BadAnnotation(/*0*/ s: kotlin.String)
|
||||
internal final val s: kotlin.String
|
||||
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
|
||||
}
|
||||
|
||||
test.BadAnnotation(s = IntegerValueType(1): IntegerValueType(1)) internal object SomeObject {
|
||||
private constructor SomeObject()
|
||||
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 class object <class-object-for-SomeObject> : test.SomeObject {
|
||||
private constructor <class-object-for-SomeObject>()
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
open class ToResolve<SomeClass>(f : (Int) -> Int)
|
||||
fun testFun(<!UNUSED_PARAMETER!>a<!> : Int) = 12
|
||||
|
||||
class TestSome<P> {
|
||||
class object : ToResolve<<!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>P<!>>({testFun(it)}) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal fun testFun(/*0*/ a: kotlin.Int): kotlin.Int
|
||||
|
||||
internal final class TestSome</*0*/ P> {
|
||||
public constructor TestSome</*0*/ P>()
|
||||
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
|
||||
|
||||
internal class object <class-object-for-TestSome> : test.ToResolve<P> {
|
||||
private constructor <class-object-for-TestSome>()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
internal open class ToResolve</*0*/ SomeClass> {
|
||||
public constructor ToResolve</*0*/ SomeClass>(/*0*/ f: (kotlin.Int) -> kotlin.Int)
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Test {
|
||||
fun test(): Int = 12
|
||||
|
||||
class object {
|
||||
val a = <!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>test()<!> // Check if resolver will be able to infer type of a variable
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal final class Test {
|
||||
public constructor Test()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
internal final fun test(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal class object <class-object-for-Test> {
|
||||
private constructor <class-object-for-Test>()
|
||||
internal final val a: kotlin.Int
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// FILE: fileDependencyRecursion.kt
|
||||
package test
|
||||
|
||||
import testOther.some
|
||||
|
||||
val normal: Int = 1
|
||||
val fromImported: Int = some
|
||||
|
||||
// FILE: fileDependencyRecursionOther.kt
|
||||
package testOther
|
||||
|
||||
import test.normal
|
||||
|
||||
val some: Int = 1
|
||||
val fromImported: Int = normal
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal val fromImported: kotlin.Int = 1
|
||||
internal val normal: kotlin.Int = 1
|
||||
}
|
||||
|
||||
package testOther {
|
||||
internal val fromImported: kotlin.Int = 1
|
||||
internal val some: kotlin.Int = 1
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// FILE: importFunctionWithAllUnderImport.kt
|
||||
package test
|
||||
|
||||
import testOther.*
|
||||
|
||||
class B: A()
|
||||
val inferTypeFromImportedFun = testFun()
|
||||
|
||||
// FILE: importFunctionWithAllUnderImportOther.kt
|
||||
package testOther
|
||||
|
||||
open class A
|
||||
fun testFun() = 1
|
||||
@@ -0,0 +1,23 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal val inferTypeFromImportedFun: kotlin.Int
|
||||
|
||||
internal final class B : testOther.A {
|
||||
public constructor B()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
package testOther {
|
||||
internal fun testFun(): kotlin.Int
|
||||
|
||||
internal open class A {
|
||||
public constructor A()
|
||||
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
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//FILE:mainFile.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package test
|
||||
|
||||
import testing.other.*
|
||||
import testing.TestFun
|
||||
|
||||
// Resolve should be ambiguous
|
||||
val a = <!OVERLOAD_RESOLUTION_AMBIGUITY!>TestFun<!>()
|
||||
|
||||
|
||||
//FILE:testing.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package testing
|
||||
|
||||
class TestFun
|
||||
|
||||
//FILE:testingOther.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package testing.other
|
||||
|
||||
fun TestFun() = 12
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
internal val a: [ERROR : Type for TestFun()]
|
||||
}
|
||||
|
||||
package testing {
|
||||
|
||||
internal final class TestFun {
|
||||
public constructor TestFun()
|
||||
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
|
||||
}
|
||||
|
||||
package testing.other {
|
||||
internal fun TestFun(): kotlin.Int
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
class B {
|
||||
class B {
|
||||
fun foo(<!UNUSED_PARAMETER!>b<!>: B.C) {
|
||||
}
|
||||
class C {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal final class B {
|
||||
public constructor B()
|
||||
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
|
||||
|
||||
internal final class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(/*0*/ b: test.B.B.C): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal final class C {
|
||||
public constructor C()
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open fun foo(a: <!UNRESOLVED_REFERENCE!>E<!>) {}
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo(a: <!UNRESOLVED_REFERENCE!>E<!>) {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal final class B : test.A {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open override /*1*/ fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class CompositeIterator<T>(vararg iterators: <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.util.Iterator<T><!>){
|
||||
val iteratorsIter = iterators.iterator()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
internal final class CompositeIterator</*0*/ T> {
|
||||
public constructor CompositeIterator</*0*/ T>(/*0*/ vararg iterators: java.util.Iterator<T> /*kotlin.Array<java.util.Iterator<T>>*/)
|
||||
internal final val iteratorsIter: kotlin.Iterator<java.util.Iterator<T>>
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user