Beispiel #1
0
        private static IType checkArrowExpression(Context context, MethodType requiredType, IExpression expression)
        {
            context = expression is ContextualExpression ? ((ContextualExpression)expression).Calling : context.getCallingContext();
            ArrowExpression arrow = (ArrowExpression)(expression is ArrowExpression ? expression : ((ContextualExpression)expression).Expression);

            return(requiredType.checkArrowExpression(context, arrow));
        }
Beispiel #2
0
 public IType checkProto(Context context, MethodType type)
 {
     if (expression is ArrowExpression)
     {
         return(type.checkArrowExpression(context, (ArrowExpression)expression));
     }
     else
     {
         return(expression.check(context));
     }
 }