Prohibit DelegationBy specifier when no primary constructor
Also add codegen test for case when there is primary
This commit is contained in:
@@ -304,6 +304,9 @@ public class BodyResolver {
|
||||
JetType expectedType = supertype != null ? supertype : NO_EXPECTED_TYPE;
|
||||
typeInferrer.getType(scope, delegateExpression, expectedType, c.getOuterDataFlowInfo(), trace);
|
||||
}
|
||||
if (primaryConstructor == null) {
|
||||
trace.report(UNSUPPORTED.on(specifier, "Delegation without primary constructor is not supported"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user