Exemplo n.º 1
0
        public override object VisitRepeatStatement([NotNull] RepeatStatementContext context)
        {
            var type = TypeVisitor.GetType(context.expression(), scope, errors);

            if (!type.InheritsFrom(TypeSystem.Instance["Boolean"]))
            {
                errors.Add(new Error(context, $"Expression type must be {TypeSystem.Instance["Boolean"]}"));
            }

            return(base.VisitRepeatStatement(context));
        }