Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed

This commit is contained in:
Mikhail Glukhikh
2020-03-04 17:54:33 +03:00
parent 186e0b0cba
commit 8884cbe415
2268 changed files with 1175 additions and 19754 deletions
@@ -1,22 +0,0 @@
// FILE: BaseClass.java
import org.jetbrains.annotations.NotNull;
public class BaseClass {
public void loadCache(@NotNull Object... args) {}
}
// FILE: main.kt
class A : BaseClass() {
// org.jetbrains.annotations.NotNull has @Target PARAMETER, so it doesn't affect elements type
override fun loadCache(vararg args: Any?) {
super.loadCache(*args)
}
}
class B : BaseClass() {
// org.jetbrains.annotations.NotNull has @Target PARAMETER, so it doesn't affect elements type
override fun loadCache(vararg args: Any) {
super.loadCache(*args)
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: BaseClass.java
import org.jetbrains.annotations.NotNull;
@@ -1,22 +0,0 @@
// FILE: BaseClass.java
import org.jetbrains.annotations.Nullable;
public class BaseClass {
public void loadCache(@Nullable Object... args) {}
}
// FILE: main.kt
class A : BaseClass() {
// org.jetbrains.annotations.Nullable has @Target PARAMETER, so it doesn't affect elements type
override fun loadCache(vararg args: Any?) {
super.loadCache(*args)
}
}
class B : BaseClass() {
// org.jetbrains.annotations.Nullable has @Target PARAMETER, so it doesn't affect elements type
override fun loadCache(vararg args: Any) {
super.loadCache(*args)
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: BaseClass.java
import org.jetbrains.annotations.Nullable;
@@ -1,17 +0,0 @@
// FILE: A.java
// ANDROID_ANNOTATIONS
import kotlin.annotations.jvm.internal.*;
public class A {
public void connect(@ParameterName("host") String host, @ParameterName("port") int port) {
}
}
// FILE: test.kt
fun main() {
val test = A()
test.connect("127.0.0.1", 8080)
test.connect(host = "127.0.0.1", port = 8080)
test.connect(port = 8080, host = "127.0.0.1")
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: A.java
// ANDROID_ANNOTATIONS
@@ -1,20 +0,0 @@
// FILE: A.java
// ANDROID_ANNOTATIONS
import kotlin.annotations.jvm.internal.*;
public class A {
public void foo(@ParameterName("hello") String world) {}
}
// FILE: B.kt
class B : A() {
override fun foo(hello: String) {}
}
// FILE: C.kt
class C : A() {
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: A.java
// ANDROID_ANNOTATIONS
import kotlin.annotations.jvm.internal.*;
@@ -1,17 +0,0 @@
// IGNORE_BACKEND: JS, NATIVE
// FILE: A.java
// ANDROID_ANNOTATIONS
import kotlin.annotations.jvm.internal.*;
class A {
public static String withDefault(@DefaultValue("OK") String arg) {
return arg;
}
}
// FILE: test.kt
fun box(): String {
return A.withDefault();
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// IGNORE_BACKEND: JS, NATIVE
// FILE: A.java