KT-15878 Extension shadowed by member shouldn't be reported for infix/operator extensions when member is non-infix/operator
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
interface IFoo {
|
||||
fun foo(i: Int): Int
|
||||
infix fun bar(i: Int): Int
|
||||
}
|
||||
|
||||
infix fun IFoo.foo(i: Int) = i
|
||||
infix fun IFoo.<!EXTENSION_SHADOWED_BY_MEMBER!>bar<!>(i: Int) = i
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public infix fun IFoo.bar(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public infix fun IFoo.foo(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
|
||||
public interface IFoo {
|
||||
public abstract infix fun bar(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
interface Test {
|
||||
fun invoke()
|
||||
operator fun invoke(i: Int): Int
|
||||
}
|
||||
|
||||
operator fun Test.invoke() {}
|
||||
operator fun Test.invoke() {}
|
||||
operator fun Test.<!EXTENSION_SHADOWED_BY_MEMBER!>invoke<!>(i: Int) = i
|
||||
+2
@@ -1,10 +1,12 @@
|
||||
package
|
||||
|
||||
public operator fun Test.invoke(): kotlin.Unit
|
||||
public operator fun Test.invoke(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
|
||||
public interface Test {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract fun invoke(): kotlin.Unit
|
||||
public abstract operator fun invoke(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user