Better tests
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
// FILE: rootPackage.kt
|
||||
class Klass {
|
||||
class Nested
|
||||
}
|
||||
|
||||
class NotImported
|
||||
|
||||
fun function() = ""
|
||||
|
||||
val property = ""
|
||||
@@ -16,6 +19,7 @@ fun foo(): Klass {
|
||||
package pkg
|
||||
|
||||
import Klass
|
||||
import Klass.Nested
|
||||
import function
|
||||
import property
|
||||
|
||||
@@ -23,3 +27,6 @@ fun foo(): Klass {
|
||||
function() + property
|
||||
return Klass()
|
||||
}
|
||||
|
||||
val v: Nested = Nested()
|
||||
val x: <!UNRESOLVED_REFERENCE!>NotImported<!> = <!UNRESOLVED_REFERENCE!>NotImported<!>()
|
||||
@@ -9,8 +9,24 @@ internal final class Klass {
|
||||
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 Nested {
|
||||
public constructor Nested()
|
||||
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 NotImported {
|
||||
public constructor NotImported()
|
||||
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 pkg {
|
||||
internal val v: Klass.Nested
|
||||
internal val x: [ERROR : NotImported]
|
||||
internal fun foo(): Klass
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// ResolveSession.resolveToDescriptor used to crash on such code, so we just check that it's ok now
|
||||
import kotlin.Double
|
||||
import kotlin.List
|
||||
import kotlin.arrayOfNulls
|
||||
|
||||
@@ -10,4 +10,5 @@ class Bar: Foo() {
|
||||
fun foo(): Nested? = null
|
||||
}
|
||||
|
||||
fun foo(): <!INVISIBLE_REFERENCE!>Nested<!>? = null
|
||||
fun foo(): <!INVISIBLE_REFERENCE!>Nested<!>? = null
|
||||
fun bar(): p.Foo.<!INVISIBLE_REFERENCE!>Nested<!>? = null
|
||||
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
package p {
|
||||
internal fun bar(): p.Foo.Nested?
|
||||
internal fun foo(): p.Foo.Nested?
|
||||
|
||||
internal final class Bar : p.Foo {
|
||||
|
||||
@@ -6,7 +6,7 @@ public open class InetAddressImpl
|
||||
// FILE: Main.kt
|
||||
package a
|
||||
|
||||
import java.net.*
|
||||
import java.net.* // should not import java.net.InetAddressImpl because it's package local
|
||||
import pack.*
|
||||
|
||||
class X : InetAddressImpl()
|
||||
class X : InetAddressImpl() // should resolve to our pack.InetAddressImpl
|
||||
|
||||
Reference in New Issue
Block a user