[FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER
This commit is contained in:
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
fun test1(f: String.() -> Unit) {
|
||||
(f)(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
<!NO_VALUE_FOR_PARAMETER!>(f)()<!>
|
||||
|
||||
f(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
<!NO_VALUE_FOR_PARAMETER!>f()<!>
|
||||
}
|
||||
|
||||
fun test2(f: (Int) -> Int) {
|
||||
|
||||
Vendored
+3
-3
@@ -1,11 +1,11 @@
|
||||
fun test1(f: String.() -> Unit) {
|
||||
(f)(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
(f)<!NO_VALUE_FOR_PARAMETER!>()<!>
|
||||
|
||||
f(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
f<!NO_VALUE_FOR_PARAMETER!>()<!>
|
||||
}
|
||||
|
||||
fun test2(f: (Int) -> Int) {
|
||||
1.<!UNRESOLVED_REFERENCE!>f<!>(2)
|
||||
|
||||
2.<!NO_RECEIVER_ALLOWED!>(f)<!>(2)
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ fun test1() {
|
||||
|
||||
fun test2(f: String.(Int) -> Unit) {
|
||||
<!ARGUMENT_TYPE_MISMATCH!>11<!>.(f)(1)
|
||||
11.(f)(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
11.<!NO_VALUE_FOR_PARAMETER!>(f)()<!>
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ class SomeClass
|
||||
|
||||
fun test(identifier: SomeClass, fn: String.() -> Unit) {
|
||||
<!NONE_APPLICABLE!>identifier<!>()
|
||||
identifier(123<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
identifier(<!NO_VALUE_FOR_PARAMETER!>123)<!>
|
||||
identifier(1, <!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
<!ARGUMENT_TYPE_MISMATCH!>1<!>.fn()
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,10 +11,10 @@ fun test(a: A) {
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>("")
|
||||
|
||||
with("") {
|
||||
a.x(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>x()<!>
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>()
|
||||
if (a.x != null) {
|
||||
a.x(<!NO_VALUE_FOR_PARAMETER!>)<!> // todo
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>x()<!> // todo
|
||||
(a.x)()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ fun test(a: A) {
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>("")
|
||||
|
||||
with("") {
|
||||
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!>(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!><!NO_VALUE_FOR_PARAMETER!>()<!>
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>()
|
||||
if (a.x != null) {
|
||||
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!>(<!NO_VALUE_FOR_PARAMETER!>)<!> // todo
|
||||
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!><!NO_VALUE_FOR_PARAMETER!>()<!> // todo
|
||||
<!DEBUG_INFO_SMARTCAST!>(a.x)<!>()
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
-4
@@ -23,8 +23,8 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.(foo)(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>foo()<!>
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>(foo)()<!>
|
||||
|
||||
(a.foo)()
|
||||
|
||||
@@ -65,8 +65,8 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.(foo)(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>foo()<!>
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>(foo)()<!>
|
||||
|
||||
(a.foo)()
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -23,7 +23,7 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.foo<!NO_VALUE_FOR_PARAMETER!>()<!>
|
||||
a.<!FUNCTION_EXPECTED!>(<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>)<!>()
|
||||
|
||||
(a.foo)()
|
||||
@@ -65,7 +65,7 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.foo<!NO_VALUE_FOR_PARAMETER!>()<!>
|
||||
a.<!FUNCTION_EXPECTED!>(<!UNRESOLVED_REFERENCE!>foo<!>)<!>()
|
||||
|
||||
(a.foo)()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
val foo: B.() -> Unit get() = null!!
|
||||
}
|
||||
|
||||
class B
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(b) {
|
||||
a.<!NO_VALUE_FOR_PARAMETER!>foo()<!> // here must be error, because a is not extension receiver
|
||||
|
||||
a.foo(this)
|
||||
|
||||
(a.foo)()
|
||||
|
||||
(a.foo)(this)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
class A {
|
||||
val foo: B.() -> Unit get() = null!!
|
||||
}
|
||||
@@ -7,7 +6,7 @@ class B
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(b) {
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!> // here must be error, because a is not extension receiver
|
||||
a.foo<!NO_VALUE_FOR_PARAMETER!>()<!> // here must be error, because a is not extension receiver
|
||||
|
||||
a.foo(this)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user