[JS IR BE] Update test data
This commit is contained in:
committed by
Roman Artemev
parent
17d71f1e46
commit
6ac4fd2e5f
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun t1 () {
|
||||
val a1 = arrayOfNulls<String>(1)
|
||||
a1[0] = "0" //ok
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Content() {
|
||||
override fun toString() = "OK"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KT-4145
|
||||
|
||||
interface A {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface D1 {
|
||||
fun foo(): Any
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A<T> {
|
||||
var size: T = 56 as T
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
package test
|
||||
|
||||
public interface FunDependencyEdge {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A<T> {
|
||||
open var x: T = "Fail" as T
|
||||
get
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
abstract class A {
|
||||
inner class InnerInA {
|
||||
fun returnOk() = "OK"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KT-12044 Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property references
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class Foo(var bar: Int?)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class Box(var value: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class A
|
||||
class B
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun println(s: String) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo() {}
|
||||
|
||||
fun bar(): Int? = foo() as? Int
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class A
|
||||
|
||||
class B
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class C() {
|
||||
companion object {
|
||||
fun create() = C()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface One {
|
||||
public open fun foo() : Int
|
||||
public open fun faz() : Int = 10
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface First {
|
||||
public open fun foo() : Int
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A(val value: String) {
|
||||
inner class B(val s: String) {
|
||||
val result = value + "_" + s
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class T(val f : () -> Any?) {
|
||||
fun call() : Any? = f()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Bar {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun test1(str: String): String {
|
||||
data class A(val x: Int) {
|
||||
fun foo() = str
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface A<T> {
|
||||
var zzzValue : T
|
||||
fun zzz() : T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun test(
|
||||
b: Boolean,
|
||||
i: Int
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(var string: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// LANGUAGE_VERSION: 1.1
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val a: Foo<String>) {}
|
||||
|
||||
class Foo<T>(val a: T) { }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val v: Any?)
|
||||
|
||||
data class B<T>(val v: T)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Dummy {
|
||||
override fun equals(other: Any?) = true
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: Int) {
|
||||
override fun hashCode(): Int = -3
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A<T>(val t: T)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val a: Any?, var x: Int)
|
||||
data class B(val a: Any?)
|
||||
data class C(val a: Int, var x: Int?)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(var x: Int, val z: Int)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: Int, val y: Any?, val z: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// See KT-6206 Always generate hashCode() and equals() for data classes even if base classes have non-trivial analogs
|
||||
|
||||
abstract class Base {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: Int) {
|
||||
override fun toString(): String = "!"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(var string: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(var x: Int, val z: Int?)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(var x: Int, var y: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A<T, F>(val x: T, val y: F)
|
||||
|
||||
fun <X, Y> foo(a: A<X, Y>, block: (A<X, Y>) -> String) = block(a)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: String, val y: String)
|
||||
|
||||
inline fun foo(a: A, block: (A) -> String): String = block(a)
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: String, val y: String)
|
||||
|
||||
fun foo(a: A, block: (Int, A, String) -> String): String = block(1, a, "#")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val x: String, val y: String)
|
||||
|
||||
fun foo(a: A, block: (A) -> String): String = block(a)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface Expr {
|
||||
public fun ttFun() : Int = 12
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
public class MPair<out A> (
|
||||
public val first: A
|
||||
) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val f = fun (s: String): String = s
|
||||
val g = f as String.() -> String
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val plusZero: Any = 0.0
|
||||
val minusZero: Any = -0.0
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun less(x: Comparable<Float>, y: Float) = x is Float && x < y
|
||||
fun less(x: Comparable<Double>, y: Double) = x is Double && x < y
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun equals1(a: Double, b: Double) = a == b
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun equals1(a: Float, b: Float) = a == b
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun equals1(a: Double, b: Double?) = a == b
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun equals1(a: Float, b: Float?) = a == b
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun greater1(a: Double, b: Double) = a > b
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun greater1(a: Float, b: Float) = a > b
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun less1(a: Double, b: Double) = a < b
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun less1(a: Float, b: Float) = a < b
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val plusZero: Any? = 0.0
|
||||
val minusZero: Any? = -0.0
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun box(): String {
|
||||
val plusZero: Any = 0.0
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun box(): String {
|
||||
val plusZero: Any = 0.0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val nullValue: Any? = null
|
||||
val nullDouble: Double? = null
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// LANGUAGE_VERSION: 1.0
|
||||
fun box(): String {
|
||||
val nullValue: Any? = null
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun box(): String {
|
||||
val plusZero: Any = 0.0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface Base
|
||||
class Derived: Base
|
||||
class Another: Base
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Base
|
||||
class Derived: Base()
|
||||
operator fun Derived.inc(): Derived { return Derived() }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class MyClass
|
||||
|
||||
operator fun MyClass?.inc(): MyClass? = null
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface Base
|
||||
class Derived: Base
|
||||
class Another: Base
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Base
|
||||
class Derived: Base()
|
||||
operator fun Derived.inc(): Derived { return Derived() }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
inline class UInt(val s: Int)
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
inline class Result<T>(val a: Any?) {
|
||||
fun typed(): T = a as T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val a: Int, val b: Int)
|
||||
|
||||
fun box() : String
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
package t
|
||||
|
||||
class Reproduce {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class Z(val p: String, val k: String)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
sealed class A {
|
||||
class B : A()
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Annotation
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box() : String {
|
||||
return if(true.and(true)) "OK" else "fail"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box() : String {
|
||||
val b = true as? Boolean //exception
|
||||
val i = 1 as Int //exception
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
package demo
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo(x: Int) = x
|
||||
|
||||
fun bar(x: Comparable<Int>) = if (x is Int) foo(x) else 0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A
|
||||
class B : A() {
|
||||
fun foo() = 1
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
annotation class Anno
|
||||
|
||||
@Anno val Int.foo: Int
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
//KT-10934 compiler throws UninferredParameterTypeConstructor in when block that covers all types
|
||||
|
||||
class Parser<TInput, TValue>(val f: (TInput) -> Result<TInput, TValue>) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Variable {
|
||||
val lightVar: LightVariable = if (this is LightVariable) this else LightVariable()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
abstract class C {
|
||||
fun test(x: Int) {
|
||||
if (x == 0) return
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
sealed class Season {
|
||||
object Warm: Season()
|
||||
object Cold: Season()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
sealed class Season {
|
||||
class Warm: Season()
|
||||
class Cold: Season()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
internal data class A1(val prop1: String) {
|
||||
val prop2: String = "const2"
|
||||
var prop3: String = ""
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class SuperFoo {
|
||||
public fun bar(): String {
|
||||
if (this is Foo) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// See also KT-7801
|
||||
class A
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A {
|
||||
open val a = "OK"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A {
|
||||
class B : A() {
|
||||
val a = "FAIL"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A {
|
||||
fun f(): String =
|
||||
when (this) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A {
|
||||
open fun foo() = "FAIL"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun String?.foo() = this ?: "OK"
|
||||
|
||||
fun foo(i: Int?): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface A<T> {
|
||||
val property : T
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface AL {
|
||||
fun get(index: Int) : Any? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A
|
||||
|
||||
class B : A() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Test1 {
|
||||
fun test1(): String {
|
||||
if (this is Test2) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Box<T>(t: T) {
|
||||
var value = t
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user