AParametersCollection d_params = Delegate.GetParameters (delegateType);
if (HasExplicitParameters) {
- if (!VerifyExplicitParameters (ec, delegateType, d_params))
+ if (!VerifyExplicitParameters (ec, tic, delegateType, d_params))
return null;
return Parameters;
// If L has an implicitly typed parameter list we make implicit parameters explicit
// Set each parameter of L is given the type of the corresponding parameter in D
//
- if (!VerifyParameterCompatibility (ec, delegateType, d_params, ec.IsInProbingMode))
+ if (!VerifyParameterCompatibility (ec, tic, delegateType, d_params, ec.IsInProbingMode))
return null;
TypeSpec [] ptypes = new TypeSpec [Parameters.Count];
ExpressionStatement statement;
public ContextualReturn (Expression expr)
- : base (expr, expr.Location)
+ : base (expr, expr.StartLocation)
{
}
return false;
statement = Expr as ExpressionStatement;
- if (statement == null)
- Expr.Error_InvalidExpressionStatement (ec);
+ if (statement == null) {
+ var reduced = Expr as IReducedExpressionStatement;
+ if (reduced != null) {
+ statement = EmptyExpressionStatement.Instance;
+ } else {
+ Expr.Error_InvalidExpressionStatement (ec);
+ }
+ }
return true;
}