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:
Dmitry Petrov
2017-01-23 10:55:08 +03:00
parent 98075c17c9
commit 5021be351d
7 changed files with 32 additions and 2 deletions
@@ -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
@@ -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
}
@@ -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
@@ -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
}