Consider callable reference's LHS when resolving RHS

Previous resolution sequence (static scope, nested classes scope, receiver) and
a check against type parameters only made sense when there's a type, not an
expression, on the LHS of a callable reference. Also TransientReceiver is
incorrect in such case because private-to-this visibility check only works for
ExpressionReceiver values
This commit is contained in:
Alexander Udalov
2016-06-15 19:24:46 +03:00
parent 6562a2db19
commit 456ba79793
11 changed files with 180 additions and 25 deletions
@@ -0,0 +1,12 @@
package
public final class Foo</*0*/ out T> {
public constructor Foo</*0*/ out T>(/*0*/ name: T)
private/*private to this*/ final var prop: T
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
private/*private to this*/ final fun func(/*0*/ t: T): T
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public final fun testFunc(): kotlin.Unit
public final fun testProp(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}