Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
// FILE: kotlin.kt
|
||||
fun foo() {
|
||||
JavaClass()
|
||||
JavaClass("")
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
|
||||
public class JavaClass {
|
||||
public JavaClass() { }
|
||||
|
||||
public JavaClass(String... ss) { }
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: kotlin.kt
|
||||
fun foo() {
|
||||
JavaClass()
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
void from(String s) {}
|
||||
void from(String... s) {}
|
||||
}
|
||||
|
||||
// FILE: kotlin.kt
|
||||
fun main() {
|
||||
JavaClass().from()
|
||||
JavaClass().from("")
|
||||
JavaClass().from("", "")
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
void from(String s) {}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun printAll(vararg a : Any) {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
printAll(*args) // Shouldn't be an error
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun printAll(vararg a : Any) {}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// KT-422 Tune literal typing rules so that varargs overloaded by primitive types work
|
||||
|
||||
fun <T> foo(vararg t : T) = t
|
||||
fun foo(vararg a: Int) = a
|
||||
fun foo(vararg a: Long) = a
|
||||
|
||||
fun test() {
|
||||
foo(1, 2, 3) // Error, but should be foo of ints
|
||||
}
|
||||
|
||||
fun <T> array(vararg elements : T) = elements
|
||||
fun array(vararg elements : Int) = elements
|
||||
|
||||
fun test1() {
|
||||
array("A", "A")
|
||||
array(1, 1)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-422 Tune literal typing rules so that varargs overloaded by primitive types work
|
||||
|
||||
fun <T> foo(vararg t : T) = t
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun bar(vararg a: String) {}
|
||||
|
||||
fun test2(a: Array<String>, b: Array<out String>) {
|
||||
bar(*a)
|
||||
bar(*b)
|
||||
bar("", *a, *b, "")
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun bar(vararg a: String) {}
|
||||
|
||||
Reference in New Issue
Block a user