示例#1
0
        private IExpression BindExpression()
        {
            var expression = _context.BindExpression(_methodBodySymbolContext, _diagnostics);

            if (!(expression.Type is IInterface))             //TODO: do we want to make this check lazy?
            {
                _diagnostics.Add(new Diagnostic(new Location(_context), ErrorCode.CannotMixInNonInterface, ImmutableArray.Create <object?>(expression.Type)));
            }
            return(expression);
        }