Fix extension receiver coercion for inline classes
#KT-27031
This commit is contained in:
@@ -721,7 +721,7 @@ public abstract class StackValue {
|
||||
) {
|
||||
// Coerce 'this' for the case when it is smart cast.
|
||||
// Do not coerce for other cases due to the 'protected' access issues (JVMS 7, 4.9.2 Structural Constraints).
|
||||
boolean coerceType = descriptor.getKind() == ClassKind.INTERFACE || (castReceiver && !isSuper);
|
||||
boolean coerceType = descriptor.getKind() == ClassKind.INTERFACE || descriptor.isInline() || (castReceiver && !isSuper);
|
||||
return new ThisOuter(codegen, descriptor, isSuper, coerceType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user