From 083cb00e8d5746abe34a4844334d7d777f504fec Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 10 Oct 2017 11:26:29 +0200 Subject: [PATCH] added a minor note to destroyer.nim --- compiler/destroyer.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/destroyer.nim b/compiler/destroyer.nim index 2ccef17242..95997e3c84 100644 --- a/compiler/destroyer.nim +++ b/compiler/destroyer.nim @@ -39,6 +39,9 @@ ## x = y where y is read only once ## is the same as: move(x, y) ## +## Actually the more general rule is: The *last* read of ``y`` +## can become a move if ``y`` is the result of a construction. +## ## We also need to keep in mind here that the number of reads is ## control flow dependent: ## let x = foo()