public override void VisitMoveExpression(MoveExpressionSyntax moveExpression, Void args) { base.VisitMoveExpression(moveExpression, args); // TODO do we need to check this is something valid to move out of? moveExpression.Expression.ValueSemantics = ValueSemantics.Move; moveExpression.ValueSemantics = ValueSemantics.Move; }
public virtual void VisitMoveExpression(MoveExpressionSyntax moveExpression, A args) { VisitExpression(moveExpression.Expression, args); }
public static Diagnostic CannotMoveBorrowedValue(CodeFile file, MoveExpressionSyntax expression) { return(new Diagnostic(file, expression.Span, DiagnosticLevel.FatalCompilationError, DiagnosticPhase.Analysis, 3009, $"Cannot move borrowed value `{file.Code[expression.Expression.Span]}`")); }