JVM Backend: always inline callable containing reified TP
This commit is contained in:
committed by
Alexander Udalov
parent
b86e19782c
commit
abbcf61183
@@ -2283,7 +2283,9 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
||||
) {
|
||||
if (callElement == null) return defaultCallGenerator;
|
||||
|
||||
boolean isInline = state.isInlineEnabled() &&
|
||||
// We should inline callable containing reified type parameters even if inline is disabled
|
||||
// because they may contain something to reify and straight call will probably fail at runtime
|
||||
boolean isInline = (state.isInlineEnabled() || DescriptorUtils.containsReifiedTypeParameters(descriptor)) &&
|
||||
descriptor instanceof SimpleFunctionDescriptor &&
|
||||
((SimpleFunctionDescriptor) descriptor).getInlineStrategy().isInline();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user