[FIR] Introduce FirResolvedArgumentList with argument-parameter mapping

#KT-36345 Fixed
This commit is contained in:
Mikhail Glukhikh
2020-03-11 13:46:09 +03:00
parent 6b0a3aa176
commit 3d17ce05b5
27 changed files with 49 additions and 37 deletions
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KT-9277 Unexpected NullPointerException in an invocaton with named arguments
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
var res = "";
var call = test(a = {res += "K"; "K"}(), b = {res+="O"; "O"}(), c = {res += "L"; "L"})
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
var res = "";
var call = Z("Z").test(a = {res += "K"; "K"}(), b = {res+="O"; "O"}(), c = {res += "L"; "L"})
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(val a: Int = 0, val b: String = "a")
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Int.foo(a: Int = 1,
b: Int = 2,
c: Int = 3,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Int.foo(a: Int = 1, b: String): Int {
return a
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
fun Int.foo(a: Int = 1,
b: Int = 2,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A() {
fun foo(a: Int = 1,
b: Int = 2,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun foo(a: String = "Companion", b: Int = 1, c: Long = 2): String {
return "$a $b $c"
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun foo(a: Int = 1,
b: Int = 2,
c: Int = 3,
@@ -1,5 +1,4 @@
// !LANGUAGE: +ProperComputationOrderOfTailrecDefaultParameters
// IGNORE_BACKEND_FIR: JVM_IR
// DONT_RUN_GENERATED_CODE: JS
var counter = 0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> T.toPrefixedString(prefix: String = "", suffix: String="") = prefix + this.toString() + suffix
fun box() : String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: test.kt
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: test.kt
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: equalsNull.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
val global = "OK"
class A {
val prop: String
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: A.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun foo(a: Int, vararg b: Int, f: (IntArray) -> String): String {
return "test" + a + " " + f(b)
}