Substitutions fixed for projections
This commit is contained in:
+1
-1
@@ -151,7 +151,7 @@ public class FunctionDescriptorImpl extends DeclarationDescriptorImpl implements
|
||||
|
||||
ReceiverDescriptor substitutedExpectedThis = NO_RECEIVER;
|
||||
if (expectedThisObject.exists()) {
|
||||
JetType substitutedType = substitutor.substitute(expectedThisObject.getType(), Variance.IN_VARIANCE);
|
||||
JetType substitutedType = substitutor.substitute(expectedThisObject.getType(), Variance.INVARIANT);
|
||||
if (substitutedType == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
fun Int.foo() : Boolean = true
|
||||
|
||||
fun foo() : Int {
|
||||
val s = ""
|
||||
val x = 1
|
||||
@@ -17,7 +19,7 @@ fun foo() : Int {
|
||||
else => 1
|
||||
}
|
||||
return when (<warning>x</warning>?:null) {
|
||||
<error>.</error>equals(1) => 1
|
||||
<error>.</error>foo() => 1
|
||||
?.equals(1).equals(2) => 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user