FIR2IR: generate both dispatch & extension receiver without 'else if'

This commit is contained in:
Mikhail Glukhikh
2020-02-25 11:27:51 +03:00
parent 4f6fe1d0ca
commit 8c155578f7
21 changed files with 6 additions and 20 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class It {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class It {
operator fun next() = 5
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
object A {
fun Int.foo(a: Int = 1): Int {
return a
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun Int.foo(a: Int = 1): Int {
return a
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun Double.foo(a: Double = 1.0): Double {
return a
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun Double.foo(a: Double = 1.0, b: Double = 1.0): Double {
return a + b
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
class A {
private val sb: StringBuilder = StringBuilder()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Request(val path: String) {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C() {
fun Any.toMyPrefixedString(prefix: String = "", suffix: String="") : String = prefix + " " + suffix
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A
class B {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer {
class Nested{
fun foo(s: String) = s.extension()
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
package name
class Test() {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// KT-6153 java.lang.IllegalStateException while building
object Bug {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
open val a = "OK"
}
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Bob {
fun Bob.bar() = "OK"
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class B {
val p = "OK"
}