[FIR] Report INAPPLICABLE_INFIX_MODIFIER on vararg parameter, position INAPPLICABLE_INFIX_MODIFIER on infix keyword
#KT-59974
This commit is contained in:
committed by
Space Team
parent
aebbdeaf92
commit
a77349edb4
@@ -1,10 +1,10 @@
|
|||||||
infix fun Int.good(x: Int) {}
|
infix fun Int.good(x: Int) {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.foo(x: Int, y: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun Int.foo(x: Int, y: Int) {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.bar() {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun Int.bar() {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun baz(x: Int, y: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun baz(x: Int, y: Int) {}
|
||||||
|
|
||||||
<!WRONG_MODIFIER_TARGET!>infix<!> class A
|
<!WRONG_MODIFIER_TARGET!>infix<!> class A
|
||||||
|
|
||||||
@@ -16,9 +16,9 @@ class C {
|
|||||||
infix fun good(x: Int) {}
|
infix fun good(x: Int) {}
|
||||||
infix fun Int.goodAsWell(x: Int) {}
|
infix fun Int.goodAsWell(x: Int) {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.foo(x: Int, y: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun Int.foo(x: Int, y: Int) {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.bar() {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun Int.bar() {}
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun baz(x: Int, y: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun baz(x: Int, y: Int) {}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -459,7 +459,7 @@ object DIAGNOSTICS_LIST : DiagnosticList("FirErrors") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val MODIFIERS by object : DiagnosticGroup("Modifiers") {
|
val MODIFIERS by object : DiagnosticGroup("Modifiers") {
|
||||||
val INAPPLICABLE_INFIX_MODIFIER by error<PsiElement>()
|
val INAPPLICABLE_INFIX_MODIFIER by error<PsiElement>(PositioningStrategy.INFIX_MODIFIER)
|
||||||
val REPEATED_MODIFIER by error<PsiElement> {
|
val REPEATED_MODIFIER by error<PsiElement> {
|
||||||
parameter<KtModifierKeywordToken>("modifier")
|
parameter<KtModifierKeywordToken>("modifier")
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -104,6 +104,7 @@ enum class PositioningStrategy(private val strategy: String? = null) {
|
|||||||
LABEL,
|
LABEL,
|
||||||
COMMAS,
|
COMMAS,
|
||||||
OPERATOR_MODIFIER,
|
OPERATOR_MODIFIER,
|
||||||
|
INFIX_MODIFIER,
|
||||||
NON_FINAL_MODIFIER_OR_NAME,
|
NON_FINAL_MODIFIER_OR_NAME,
|
||||||
ENUM_MODIFIER,
|
ENUM_MODIFIER,
|
||||||
FIELD_KEYWORD,
|
FIELD_KEYWORD,
|
||||||
|
|||||||
+1
-1
@@ -333,7 +333,7 @@ object FirErrors {
|
|||||||
val EXPOSED_TYPE_PARAMETER_BOUND by error3<KtTypeReference, EffectiveVisibility, FirBasedSymbol<*>, EffectiveVisibility>()
|
val EXPOSED_TYPE_PARAMETER_BOUND by error3<KtTypeReference, EffectiveVisibility, FirBasedSymbol<*>, EffectiveVisibility>()
|
||||||
|
|
||||||
// Modifiers
|
// Modifiers
|
||||||
val INAPPLICABLE_INFIX_MODIFIER by error0<PsiElement>()
|
val INAPPLICABLE_INFIX_MODIFIER by error0<PsiElement>(SourceElementPositioningStrategies.INFIX_MODIFIER)
|
||||||
val REPEATED_MODIFIER by error1<PsiElement, KtModifierKeywordToken>()
|
val REPEATED_MODIFIER by error1<PsiElement, KtModifierKeywordToken>()
|
||||||
val REDUNDANT_MODIFIER by warning2<PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
|
val REDUNDANT_MODIFIER by warning2<PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
|
||||||
val DEPRECATED_MODIFIER by warning2<PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
|
val DEPRECATED_MODIFIER by warning2<PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
|
||||||
|
|||||||
+5
-1
@@ -18,7 +18,11 @@ object FirInfixFunctionDeclarationChecker : FirBasicDeclarationChecker() {
|
|||||||
override fun check(declaration: FirDeclaration, context: CheckerContext, reporter: DiagnosticReporter) {
|
override fun check(declaration: FirDeclaration, context: CheckerContext, reporter: DiagnosticReporter) {
|
||||||
if ((declaration as? FirMemberDeclaration)?.status?.isInfix != true) return
|
if ((declaration as? FirMemberDeclaration)?.status?.isInfix != true) return
|
||||||
val simpleFunction = declaration as FirSimpleFunction
|
val simpleFunction = declaration as FirSimpleFunction
|
||||||
if (simpleFunction.valueParameters.size != 1 || !hasExtensionOrDispatchReceiver(simpleFunction, context)) {
|
if (
|
||||||
|
(simpleFunction.valueParameters.size != 1) ||
|
||||||
|
!hasExtensionOrDispatchReceiver(simpleFunction, context) ||
|
||||||
|
simpleFunction.valueParameters.single().isVararg
|
||||||
|
) {
|
||||||
reporter.reportOn(declaration.source, FirErrors.INAPPLICABLE_INFIX_MODIFIER, context)
|
reporter.reportOn(declaration.source, FirErrors.INAPPLICABLE_INFIX_MODIFIER, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -473,6 +473,9 @@ object LightTreePositioningStrategies {
|
|||||||
val OPERATOR_MODIFIER: LightTreePositioningStrategy =
|
val OPERATOR_MODIFIER: LightTreePositioningStrategy =
|
||||||
ModifierSetBasedLightTreePositioningStrategy(KtTokens.OPERATOR_KEYWORD)
|
ModifierSetBasedLightTreePositioningStrategy(KtTokens.OPERATOR_KEYWORD)
|
||||||
|
|
||||||
|
val INFIX_MODIFIER: LightTreePositioningStrategy =
|
||||||
|
ModifierSetBasedLightTreePositioningStrategy(KtTokens.INFIX_KEYWORD)
|
||||||
|
|
||||||
val ENUM_MODIFIER: LightTreePositioningStrategy =
|
val ENUM_MODIFIER: LightTreePositioningStrategy =
|
||||||
ModifierSetBasedLightTreePositioningStrategy(KtTokens.ENUM_KEYWORD)
|
ModifierSetBasedLightTreePositioningStrategy(KtTokens.ENUM_KEYWORD)
|
||||||
|
|
||||||
|
|||||||
+4
@@ -315,6 +315,10 @@ object PositioningStrategies {
|
|||||||
val OPERATOR_MODIFIER: PositioningStrategy<KtModifierListOwner> =
|
val OPERATOR_MODIFIER: PositioningStrategy<KtModifierListOwner> =
|
||||||
ModifierSetBasedPositioningStrategy(KtTokens.OPERATOR_KEYWORD)
|
ModifierSetBasedPositioningStrategy(KtTokens.OPERATOR_KEYWORD)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val INFIX_MODIFIER: PositioningStrategy<KtModifierListOwner> =
|
||||||
|
ModifierSetBasedPositioningStrategy(KtTokens.INFIX_KEYWORD)
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val ENUM_MODIFIER: PositioningStrategy<KtModifierListOwner> =
|
val ENUM_MODIFIER: PositioningStrategy<KtModifierListOwner> =
|
||||||
ModifierSetBasedPositioningStrategy(KtTokens.ENUM_KEYWORD)
|
ModifierSetBasedPositioningStrategy(KtTokens.ENUM_KEYWORD)
|
||||||
|
|||||||
+5
@@ -340,6 +340,11 @@ object SourceElementPositioningStrategies {
|
|||||||
PositioningStrategies.OPERATOR_MODIFIER
|
PositioningStrategies.OPERATOR_MODIFIER
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val INFIX_MODIFIER = SourceElementPositioningStrategy(
|
||||||
|
LightTreePositioningStrategies.INFIX_MODIFIER,
|
||||||
|
PositioningStrategies.INFIX_MODIFIER
|
||||||
|
)
|
||||||
|
|
||||||
val NON_FINAL_MODIFIER_OR_NAME = SourceElementPositioningStrategy(
|
val NON_FINAL_MODIFIER_OR_NAME = SourceElementPositioningStrategy(
|
||||||
LightTreePositioningStrategies.NON_FINAL_MODIFIER_OR_NAME,
|
LightTreePositioningStrategies.NON_FINAL_MODIFIER_OR_NAME,
|
||||||
PositioningStrategies.NON_FINAL_MODIFIER_OR_NAME
|
PositioningStrategies.NON_FINAL_MODIFIER_OR_NAME
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
class Pair<out A, out B>(val first: A, val second: B)
|
|
||||||
|
|
||||||
class Example {
|
|
||||||
infix fun to(other: Example) = Pair(this, other)
|
|
||||||
fun toNonInfix(other: Example) = Pair(this, other)
|
|
||||||
}
|
|
||||||
|
|
||||||
infix fun Example.toExt(other: Example) = Pair(this, other)
|
|
||||||
fun Example.toExtNonInfix(other: Example) = Pair(this, other)
|
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Example.toExtWithExtraParams(other: Example, blah: Int = 0) = Pair(this, other)<!>
|
|
||||||
fun Example.toExtNonInfixWithExtraParams(other: Example, blah: Int = 0) = Pair(this, other)
|
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Example.toExtDefaultValues(other: Example? = null, blah: Int = 0) = Pair(this, other)<!>
|
|
||||||
fun Example.toExtNonInfixDefaultValues(other: Example? = null, blah: Int = 0) = Pair(this, other)
|
|
||||||
|
|
||||||
fun Example.withLambda(f: () -> Unit) = Pair(this, f)
|
|
||||||
|
|
||||||
fun test() {
|
|
||||||
Example() to Example()
|
|
||||||
Example() <!INFIX_MODIFIER_REQUIRED!>toNonInfix<!> Example()
|
|
||||||
Example().toNonInfix(Example())
|
|
||||||
|
|
||||||
val a = Example()
|
|
||||||
val b = Example()
|
|
||||||
|
|
||||||
a toExt b
|
|
||||||
a <!INFIX_MODIFIER_REQUIRED!>toExtNonInfix<!> b
|
|
||||||
a.toExtNonInfix(b)
|
|
||||||
|
|
||||||
a toExtWithExtraParams b
|
|
||||||
a <!INFIX_MODIFIER_REQUIRED!>toExtNonInfixWithExtraParams<!> b
|
|
||||||
|
|
||||||
a toExtDefaultValues b
|
|
||||||
a <!INFIX_MODIFIER_REQUIRED!>toExtNonInfixDefaultValues<!> b
|
|
||||||
|
|
||||||
a <!INFIX_MODIFIER_REQUIRED!>withLambda<!> { }
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
class Pair<out A, out B>(val first: A, val second: B)
|
class Pair<out A, out B>(val first: A, val second: B)
|
||||||
|
|
||||||
class Example {
|
class Example {
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ class OkTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Errors
|
// Errors
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun String.e1(o: String, o2: String? = null) = o<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun String.e1(o: String, o2: String? = null) = o
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun String.e2(o: String = "", o2: String? = null) = o<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun String.e2(o: String = "", o2: String? = null) = o
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e3() {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e3() {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e4(s: String) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e4(s: String) {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun String.e5() {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun String.e5() {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun String.e6(a: Int, b: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun String.e6(a: Int, b: Int) {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e7(a: Int, b: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e7(a: Int, b: Int) {}
|
||||||
|
|
||||||
class Example {
|
class Example {
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e8(s: String, a: Int = 0) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e8(s: String, a: Int = 0) {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e9(s: String, a: Int) {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e9(s: String, a: Int) {}
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun e10() {}<!>
|
<!INAPPLICABLE_INFIX_MODIFIER!>infix<!> fun e10() {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,219 +0,0 @@
|
|||||||
// !DIAGNOSTICS: -EXTENSION_SHADOWED_BY_MEMBER
|
|
||||||
|
|
||||||
import kotlin.reflect.KProperty
|
|
||||||
|
|
||||||
interface Example {
|
|
||||||
operator fun plus(o: Example): Example
|
|
||||||
operator fun div(o: Example): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(o: Example, s: String = ""): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(vararg o: Example): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(): Example
|
|
||||||
|
|
||||||
operator fun unaryPlus(): Example
|
|
||||||
operator fun unaryMinus(): Example
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryPlus(s: String = ""): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryMinus(o: Example)
|
|
||||||
|
|
||||||
operator fun inc(): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec(): Example?
|
|
||||||
|
|
||||||
operator fun plusAssign(n: Int)
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minusAssign(n: Int): String
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun divAssign(n: Int, a: String = "")
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun modAssign(vararg n: Int)
|
|
||||||
|
|
||||||
operator fun compareTo(other: Example): Int
|
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun equals(a: String): Boolean
|
|
||||||
|
|
||||||
operator fun contains(n: Int): Boolean
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun contains(n: Int, s: String = ""): Boolean
|
|
||||||
|
|
||||||
operator fun invoke()
|
|
||||||
|
|
||||||
operator fun get(n: Int)
|
|
||||||
operator fun get(n: Int, n2: Int)
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun get()
|
|
||||||
|
|
||||||
operator fun set(n: Int, v: Int)
|
|
||||||
operator fun set(n: Int, n2: Int, v: Int)
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun set(v: Int)
|
|
||||||
|
|
||||||
operator fun rangeTo(o: Int)
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun rangeTo(o: Int, o2: Int)
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun rangeTo(vararg o: String)
|
|
||||||
|
|
||||||
operator fun component1(): Int
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun component1(n: Int): Int
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun componentN(): Int
|
|
||||||
|
|
||||||
operator fun iterator(): String
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun iterator(n: Int): String
|
|
||||||
|
|
||||||
operator fun next(): String
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun next(n: Int): String
|
|
||||||
|
|
||||||
operator fun hasNext(): Boolean
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun hasNext(n: Int): String
|
|
||||||
|
|
||||||
infix fun i1(n: Int)
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun i1(n: Int, n2: Int)<!>
|
|
||||||
infix fun i1(vararg n: Int)
|
|
||||||
}
|
|
||||||
|
|
||||||
class OkDelegates {
|
|
||||||
operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = ""
|
|
||||||
operator fun setValue(thisRef: Any?, prop: KProperty<*>, s: String): String = ""
|
|
||||||
operator fun setValue(thisRef: Any?, prop: Any, n: Int) {}
|
|
||||||
operator fun setValue(thisRef: Any?, prop: Any?, s: String) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
class DelegatesWithErrors {
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun getValue(thisRef: Any?, prop: String): String = ""
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun setValue(thisRef: Any?, prop: String, value: String) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun setValue(thisRef: Any?, prop: KProperty<*>, vararg n: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun setValue(thisRef: Any?, prop: KProperty<*>, f: Float = 0.0f) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun getValue(prop: KProperty<*>): String = ""
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun setValue(prop: KProperty<*>, value: String) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Example2 {
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(s: String): Example
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec()
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun compareTo(vararg other: Example): Int
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun contains(vararg n: Int): Boolean
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun hasNext(): Int
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Example3 {
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun compareTo(other: Example, s: String = ""): Int
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun contains(n: Int)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
operator fun Example.plus(o: Any): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
operator fun Example.div(o: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.plus(o: Example, s: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.minus(vararg o: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.plus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.minus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.unaryPlus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
operator fun Example.unaryMinus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.unaryPlus(s: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.unaryMinus(o: Example) {}
|
|
||||||
|
|
||||||
operator fun Example.inc(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.dec(): Example? {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.plusAssign(n: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.minusAssign(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.divAssign(n: Int, a: String = "") {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.modAssign(vararg n: Int) {}
|
|
||||||
|
|
||||||
operator fun Example.compareTo(other: Example): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.equals(a: String): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.contains(n: Int): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.contains(n: Int, s: String = ""): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.invoke() {}
|
|
||||||
|
|
||||||
operator fun Example.get(n: Int) {}
|
|
||||||
operator fun Example.get(n: Int, n2: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.get() {}
|
|
||||||
|
|
||||||
operator fun Example.set(n: Int, v: Int) {}
|
|
||||||
operator fun Example.set(n: Int, n2: Int, v: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.set(v: Int) {}
|
|
||||||
|
|
||||||
operator fun Example.rangeTo(o: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.rangeTo(o: Int, o2: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.rangeTo(vararg o: String) {}
|
|
||||||
|
|
||||||
operator fun Example.component1(): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.component1(n: Int): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.componentN(): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.iterator(): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.iterator(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.next(): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.next(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
operator fun Example.hasNext(): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.hasNext(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
infix fun Example.i1(n: Int) {}
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Example.i1(n: Int, n2: Int) {}<!>
|
|
||||||
infix fun Example.i1(vararg n: Int) {}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(o: String): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun div(o: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(o: Example, s: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(vararg o: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryPlus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryMinus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryPlus(s: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun unaryMinus(o: Example) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec(): Example? {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plusAssign(n: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minusAssign(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun divAssign(n: Int, a: String = "") {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun modAssign(vararg n: Int) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun compareTo(other: Example): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun equals(a: String): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun contains(n: Int): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun contains(n: Int, s: String = ""): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun invoke() {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun get(n: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun get(n: Int, n2: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun get() {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun set(n: Int, v: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun set(n: Int, n2: Int, v: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun set(v: Int) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun rangeTo(o: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun rangeTo(o: Int, o2: Int) {}
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun rangeTo(vararg o: String) {}
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun component1(): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun component1(n: Int): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun componentN(): Int {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun iterator(): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun iterator(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun next(): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun next(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun hasNext(): Boolean {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun hasNext(n: Int): String {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
|
||||||
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun i1(n: Int) {}<!>
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun i1(n: Int, n2: Int) {}<!>
|
|
||||||
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun i1(vararg n: Int) {}<!>
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// !DIAGNOSTICS: -EXTENSION_SHADOWED_BY_MEMBER
|
// !DIAGNOSTICS: -EXTENSION_SHADOWED_BY_MEMBER
|
||||||
|
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|||||||
Reference in New Issue
Block a user