incomplete code from EA
This commit is contained in:
@@ -495,7 +495,9 @@ public class CallResolver {
|
||||
// and throw the results away
|
||||
// We'll type check the arguments later, with the inferred types expected
|
||||
TemporaryBindingTrace traceForUnknown = TemporaryBindingTrace.create(context.trace);
|
||||
JetType type = expressionTypingServices.getType(context.scope, valueArgument.getArgumentExpression(), substituteDontCare.substitute(valueParameterDescriptor.getType(), Variance.INVARIANT), traceForUnknown);
|
||||
JetExpression argumentExpression = valueArgument.getArgumentExpression();
|
||||
JetType type = argumentExpression != null ? expressionTypingServices.getType(context.scope, argumentExpression,
|
||||
substituteDontCare.substitute(valueParameterDescriptor.getType(), Variance.INVARIANT), traceForUnknown) : null;
|
||||
if (type != null && !ErrorUtils.isErrorType(type)) {
|
||||
constraintSystem.addSubtypingConstraint(VALUE_ARGUMENT.assertSubtyping(type, effectiveExpectedType));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//EA-35646
|
||||
package a
|
||||
|
||||
class MyClass1 {
|
||||
public fun plus() {}
|
||||
}
|
||||
|
||||
fun main(arg: MyClass1) {
|
||||
arg<!TOO_MANY_ARGUMENTS!>+<!><!SYNTAX!><!>
|
||||
}
|
||||
Reference in New Issue
Block a user