Drop all tests that disable features for language version less than 3
This commit is contained in:
-25
@@ -1,25 +0,0 @@
|
||||
// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Foo.java
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
class Foo {
|
||||
interface FObject<T> {
|
||||
void invoke(T i);
|
||||
}
|
||||
|
||||
public String foo(FObject<Integer> f) { return ""; }
|
||||
public int foo(Function1<Integer, Unit> f) { return 1; }
|
||||
|
||||
public String bar(FObject<Object> f) { return ""; }
|
||||
public int bar(Function1<Integer, Unit> f) { return 1; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun test() {
|
||||
Foo().<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!> {} <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
|
||||
Foo().<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!> {} <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
|
||||
}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Foo.java
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
class Foo {
|
||||
interface FObject<T> {
|
||||
void invoke(T i);
|
||||
}
|
||||
|
||||
public String foo(FObject<Integer> f) { return ""; }
|
||||
public int foo(Function1<Integer, Unit> f) { return 1; }
|
||||
|
||||
public String bar(FObject<Object> f) { return ""; }
|
||||
public int bar(Function1<Integer, Unit> f) { return 1; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun test() {
|
||||
Foo().foo {} checkType { _<Int>() }
|
||||
Foo().bar {} checkType { _<Int>() }
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.txt
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class Foo {
|
||||
public/*package*/ constructor Foo()
|
||||
public open fun bar(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int
|
||||
public open fun bar(/*0*/ f: Foo.FObject<kotlin.Any!>!): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int
|
||||
public open fun foo(/*0*/ f: Foo.FObject<kotlin.Int!>!): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public/*package*/ interface FObject</*0*/ T : 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 abstract operator fun invoke(/*0*/ i: T!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Foo.java
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
public class Foo {
|
||||
interface FObject {
|
||||
void invoke(Object i);
|
||||
}
|
||||
|
||||
public String test(FObject f) { return ""; }
|
||||
public int test(Function1<Integer, Unit> f) { return 1; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun bar() {
|
||||
Foo().<!OVERLOAD_RESOLUTION_AMBIGUITY!>test<!> {} <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Foo.java
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
public class Foo {
|
||||
interface FObject {
|
||||
void invoke(Object i);
|
||||
}
|
||||
|
||||
public String test(FObject f) { return ""; }
|
||||
public int test(Function1<Integer, Unit> f) { return 1; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun bar() {
|
||||
Foo().test {} checkType { _<Int>() }
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package
|
||||
|
||||
public fun bar(): kotlin.Unit
|
||||
|
||||
public open class Foo {
|
||||
public constructor Foo()
|
||||
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 fun test(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int
|
||||
public open fun test(/*0*/ f: Foo.FObject!): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public/*package*/ interface FObject {
|
||||
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 abstract operator fun invoke(/*0*/ i: kotlin.Any!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
// !LANGUAGE: -DefaultImportOfPackageKotlinComparisons
|
||||
|
||||
fun foo() = compareBy<String> { it.length }
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
// !LANGUAGE: -DefaultImportOfPackageKotlinComparisons
|
||||
|
||||
fun foo() = <!UNRESOLVED_REFERENCE!>compareBy<!><String> { <!UNRESOLVED_REFERENCE!>it<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>length<!> }
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo(): [ERROR : Error function type]
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// !LANGUAGE: -AdditionalBuiltInsMembers
|
||||
// SKIP_TXT
|
||||
// FULL_JDK
|
||||
|
||||
class A : java.util.ArrayList<String>() {
|
||||
// `stream` is defined in ArrayList, so it was impossible to override it in 1.0
|
||||
override fun stream(): java.util.stream.Stream<String> = super.stream()
|
||||
|
||||
// `sort` is defined in ArrayList, so it was possible to override it in 1.0
|
||||
override fun sort(c: Comparator<in String>?) {
|
||||
super.sort(c)
|
||||
}
|
||||
}
|
||||
|
||||
class A1 : java.util.ArrayList<String>() {
|
||||
// `stream` is defined in Collection, so it was possible to declare it in 1.0 without an 'override' keyword
|
||||
fun stream(): java.util.stream.Stream<String> = super.stream()
|
||||
|
||||
// `sort` is defined in ArrayList, so it was impossible to declare it in 1.0 without an 'override' keyword
|
||||
fun <!VIRTUAL_MEMBER_HIDDEN!>sort<!>(c: Comparator<in String>?) {
|
||||
super.sort(c)
|
||||
}
|
||||
}
|
||||
|
||||
interface A2 : List<String> {
|
||||
override fun stream(): java.util.stream.Stream<String> = null!!
|
||||
}
|
||||
|
||||
class B : Throwable("", null, false, false)
|
||||
|
||||
class B1 : RuntimeException() {
|
||||
override fun fillInStackTrace(): Throwable { // 'override' keyword must be prohibited, as it was in 1.0.x
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class A3(val x: List<String>) : List<String> by x
|
||||
|
||||
fun Throwable.fillInStackTrace() = 1
|
||||
|
||||
fun foo(x: List<String>, y: Throwable, z: A3) {
|
||||
x.stream()
|
||||
java.util.ArrayList<String>().stream()
|
||||
|
||||
y.fillInStackTrace() checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Int>() }
|
||||
|
||||
HashMap<String, Int>().getOrDefault(<!ARGUMENT_TYPE_MISMATCH!>Any()<!>, <!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
|
||||
// Falls back to extension in stdlib
|
||||
y.printStackTrace()
|
||||
|
||||
z.stream()
|
||||
}
|
||||
|
||||
interface X {
|
||||
fun foo(): Int = 1
|
||||
val hidden: Boolean
|
||||
}
|
||||
|
||||
class Y : X {
|
||||
// There should not be UNSUPPORTED_FEATURE diagnostic
|
||||
override fun foo() = 1
|
||||
override var hidden: Boolean = true
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// !LANGUAGE: -AdditionalBuiltInsMembers
|
||||
// SKIP_TXT
|
||||
// FULL_JDK
|
||||
|
||||
class A : java.util.ArrayList<String>() {
|
||||
// `stream` is defined in ArrayList, so it was impossible to override it in 1.0
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun stream(): java.util.stream.Stream<String> = super.<!UNRESOLVED_REFERENCE!>stream<!>()
|
||||
|
||||
// `sort` is defined in ArrayList, so it was possible to override it in 1.0
|
||||
override fun sort(c: Comparator<in String>?) {
|
||||
super.sort(c)
|
||||
}
|
||||
}
|
||||
|
||||
class A1 : java.util.ArrayList<String>() {
|
||||
// `stream` is defined in Collection, so it was possible to declare it in 1.0 without an 'override' keyword
|
||||
fun stream(): java.util.stream.Stream<String> = super.<!UNRESOLVED_REFERENCE!>stream<!>()
|
||||
|
||||
// `sort` is defined in ArrayList, so it was impossible to declare it in 1.0 without an 'override' keyword
|
||||
fun <!VIRTUAL_MEMBER_HIDDEN!>sort<!>(c: Comparator<in String>?) {
|
||||
super.sort(c)
|
||||
}
|
||||
}
|
||||
|
||||
interface A2 : List<String> {
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun stream(): java.util.stream.Stream<String> = null!!
|
||||
}
|
||||
|
||||
class B : Throwable(<!TOO_MANY_ARGUMENTS!>""<!>, <!TOO_MANY_ARGUMENTS!>null<!>, <!TOO_MANY_ARGUMENTS!>false<!>, <!TOO_MANY_ARGUMENTS!>false<!>)
|
||||
|
||||
class B1 : RuntimeException() {
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun fillInStackTrace(): Throwable { // 'override' keyword must be prohibited, as it was in 1.0.x
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class A3(val x: List<String>) : List<String> by x
|
||||
|
||||
fun Throwable.fillInStackTrace() = 1
|
||||
|
||||
fun foo(x: List<String>, y: Throwable, z: A3) {
|
||||
x.<!UNRESOLVED_REFERENCE!>stream<!>()
|
||||
java.util.ArrayList<String>().<!UNRESOLVED_REFERENCE!>stream<!>()
|
||||
|
||||
y.fillInStackTrace() checkType { _<Int>() }
|
||||
|
||||
HashMap<String, Int>().getOrDefault(Any(), null)
|
||||
|
||||
// Falls back to extension in stdlib
|
||||
y.printStackTrace()
|
||||
|
||||
z.<!UNRESOLVED_REFERENCE!>stream<!>()
|
||||
}
|
||||
|
||||
interface X {
|
||||
fun foo(): Int = 1
|
||||
val hidden: Boolean
|
||||
}
|
||||
|
||||
class Y : X {
|
||||
// There should not be UNSUPPORTED_FEATURE diagnostic
|
||||
override fun foo() = 1
|
||||
override var hidden: Boolean = true
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// !LANGUAGE: -TypeAliases
|
||||
// FILE: test.kt
|
||||
val fooException = Exception("foo")
|
||||
val barException = kotlin.Exception("bar")
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// !LANGUAGE: -TypeAliases
|
||||
// FILE: test.kt
|
||||
val fooException = Exception("foo")
|
||||
val barException = kotlin.<!UNRESOLVED_REFERENCE!>Exception<!>("bar")
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package
|
||||
|
||||
public val barException: [ERROR : Type for kotlin.Exception("bar")]
|
||||
public val fooException: java.lang.Exception
|
||||
Reference in New Issue
Block a user