private void CheckAssignment(DataType assignToType, ExpressionSyntax value) { if (assignToType is ReferenceType referenceType && referenceType.IsOwned) { if (value.ValueSemantics != ValueSemantics.Move) { diagnostics.Add(SemanticError.CantMove(function.File, value)); function.Poison(); } } }