Drop all tests that disable features for language version less than 3
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
// !LANGUAGE: -SafeCastCheckBoundSmartCasts
|
||||
|
||||
interface SomeClass {
|
||||
val data: Any?
|
||||
}
|
||||
|
||||
interface SomeSubClass : SomeClass {
|
||||
val foo: Any?
|
||||
}
|
||||
|
||||
fun g(a: SomeClass?) {
|
||||
if (a as? SomeSubClass != null) {
|
||||
// 'a' can be cast to SomeSubClass
|
||||
a.hashCode()
|
||||
a.foo
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
(a <!USELESS_CAST!>as SomeSubClass<!>).foo
|
||||
}
|
||||
val b = (a as? SomeSubClass)?.foo
|
||||
if (b != null) {
|
||||
// 'a' can be cast to SomeSubClass
|
||||
a.hashCode()
|
||||
a.foo
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
(a <!USELESS_CAST!>as SomeSubClass<!>).foo
|
||||
}
|
||||
val c = a as? SomeSubClass
|
||||
if (c != null) {
|
||||
// 'a' and 'c' can be cast to SomeSubClass
|
||||
a.hashCode()
|
||||
a.foo
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
c.hashCode()
|
||||
c.foo
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
// !LANGUAGE: -SafeCastCheckBoundSmartCasts
|
||||
|
||||
interface SomeClass {
|
||||
val data: Any?
|
||||
}
|
||||
|
||||
interface SomeSubClass : SomeClass {
|
||||
val foo: Any?
|
||||
}
|
||||
|
||||
fun g(a: SomeClass?) {
|
||||
if (a as? SomeSubClass != null) {
|
||||
// 'a' can be cast to SomeSubClass
|
||||
a<!UNSAFE_CALL!>.<!>hashCode()
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
(a as SomeSubClass).foo
|
||||
}
|
||||
val b = (a as? SomeSubClass)?.foo
|
||||
if (b != null) {
|
||||
// 'a' can be cast to SomeSubClass
|
||||
a<!UNSAFE_CALL!>.<!>hashCode()
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
(a as SomeSubClass).foo
|
||||
}
|
||||
val c = a as? SomeSubClass
|
||||
if (c != null) {
|
||||
// 'a' and 'c' can be cast to SomeSubClass
|
||||
a<!UNSAFE_CALL!>.<!>hashCode()
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
(a as? SomeSubClass)<!UNSAFE_CALL!>.<!>foo
|
||||
<!DEBUG_INFO_SMARTCAST!>c<!>.hashCode()
|
||||
<!DEBUG_INFO_SMARTCAST!>c<!>.foo
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package
|
||||
|
||||
public fun g(/*0*/ a: SomeClass?): kotlin.Unit
|
||||
|
||||
public interface SomeClass {
|
||||
public abstract val data: kotlin.Any?
|
||||
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 interface SomeSubClass : SomeClass {
|
||||
public abstract override /*1*/ /*fake_override*/ val data: kotlin.Any?
|
||||
public abstract val foo: kotlin.Any?
|
||||
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