"Inapplicable operator modifier" and "Inapplicable infix modifier" are now errors
This commit is contained in:
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(vararg a: Int): Test = Test()
|
||||
}
|
||||
val test = Test()
|
||||
test.unaryPl<caret>us()
|
||||
}
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(vararg a: Int): Test = Test()
|
||||
}
|
||||
val test = Test()
|
||||
+test
|
||||
}
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(a: Int=1): Test = Test()
|
||||
}
|
||||
val test = Test()
|
||||
test.unaryPl<caret>us()
|
||||
}
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(a: Int=1): Test = Test()
|
||||
}
|
||||
val test = Test()
|
||||
+test
|
||||
}
|
||||
idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/functionLiteralArgument.kt
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(fn: () -> Unit): Test = Test()
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(a: Int): Test = Test()
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(vararg a: Int): Test = Test()
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
|
||||
fun test() {
|
||||
class Test {
|
||||
operator fun unaryPlus(a: Int): Test = Test()
|
||||
|
||||
Reference in New Issue
Block a user