+3
-3
@@ -116,7 +116,7 @@ public class DefaultErrorMessages {
|
||||
|
||||
MAP.put(TYPE_MISMATCH, "Type mismatch: inferred type is {1} but {0} was expected", RENDER_TYPE, RENDER_TYPE);
|
||||
MAP.put(TYPE_MISMATCH_DUE_TO_EQUALS_LAMBDA_IN_FUN,
|
||||
"Inferred type is a function type, but a non-function type {0} was expected. Use either '= ...' or '{ ... }', but not both.",
|
||||
"Inferred type is a function type, but a non-function type {0} was expected. Use either ''= ...'' or '''{ ... }'', but not both.",
|
||||
RENDER_TYPE);
|
||||
MAP.put(TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS,
|
||||
"Type mismatch: inferred type is {1} but {0} was expected. Projected type {2} restricts use of {3}",
|
||||
@@ -348,7 +348,7 @@ public class DefaultErrorMessages {
|
||||
MAP.put(NESTED_CLASS_SHOULD_BE_QUALIFIED, "Nested {0} should be qualified as ''{1}''", RENDER_CLASS_OR_OBJECT_NAME, TO_STRING);
|
||||
|
||||
MAP.put(INACCESSIBLE_OUTER_CLASS_EXPRESSION, "Expression is inaccessible from a nested class ''{0}'', use ''inner'' keyword to make the class inner", NAME);
|
||||
MAP.put(NESTED_CLASS_NOT_ALLOWED, "Nested class is not allowed here, use ''inner'' keyword to make the class inner");
|
||||
MAP.put(NESTED_CLASS_NOT_ALLOWED, "Nested class is not allowed here, use 'inner' keyword to make the class inner");
|
||||
|
||||
MAP.put(HAS_NEXT_MISSING, "hasNext() cannot be called on iterator() of type ''{0}''", RENDER_TYPE);
|
||||
MAP.put(HAS_NEXT_FUNCTION_AMBIGUITY, "hasNext() is ambiguous for iterator() of type ''{0}''", RENDER_TYPE);
|
||||
@@ -377,7 +377,7 @@ public class DefaultErrorMessages {
|
||||
MAP.put(INVALID_CHARACTERS, "Name {0}", STRING);
|
||||
|
||||
MAP.put(INAPPLICABLE_OPERATOR_MODIFIER, "''operator'' modifier is inapplicable on this function: {0}", STRING);
|
||||
MAP.put(INAPPLICABLE_INFIX_MODIFIER, "'infix' modifier is inapplicable on this function: {0}", STRING);
|
||||
MAP.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable on this function: {0}", STRING);
|
||||
|
||||
MAP.put(OPERATOR_MODIFIER_REQUIRED, "''operator'' modifier is required on ''{0}'' in ''{1}''", NAME, STRING);
|
||||
MAP.put(INFIX_MODIFIER_REQUIRED, "''infix'' modifier is required on ''{0}'' in ''{1}''", NAME, STRING);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must have a single value parameter
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter
|
||||
interface Foo {
|
||||
infix fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must have a single value parameter
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter
|
||||
fun foo(x: Foo) {
|
||||
x.<caret>foo(bar = x)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function
|
||||
infix fun id(s: String) = s
|
||||
val x = <caret>id("0").get(0)
|
||||
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function
|
||||
package ppp
|
||||
|
||||
infix fun foo(p: String){}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must have a single value parameter
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter
|
||||
|
||||
class Foo {
|
||||
infix fun foo(x: Int = 0, y: Int = 0) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must have a single value parameter
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter
|
||||
|
||||
fun foo(x: Foo) {
|
||||
x.<caret>foo(1) { it * 2 }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function
|
||||
|
||||
package demo
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Replace with 'newFun(p, this)'" "true"
|
||||
// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function
|
||||
|
||||
@Deprecated("", ReplaceWith("newFun(p, this)"))
|
||||
infix fun String.oldFun(p: Int) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Replace with 'newFun(p, this)'" "true"
|
||||
// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function
|
||||
// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function
|
||||
|
||||
@Deprecated("", ReplaceWith("newFun(p, this)"))
|
||||
infix fun String.oldFun(p: Int) {
|
||||
|
||||
Reference in New Issue
Block a user