On 8/9/2011 9:53 PM, Mehrdad wrote:
On 8/8/2011 11:08 PM, Simen Kjaeraas wrote:
On Tue, 09 Aug 2011 03:36:15 +0200, Mehrdad <[email protected]>
wrote:
On 8/8/2011 4:50 PM, Andrej Mitrovic wrote:
AFAIK it disallows you to escape a reference. `in` is actually
const scope.
So this heap allocation shouldn't be happening, right?
Yes and no. Disallowing that allocation would be an optimization not
required by the language. Essentially, 'scope' in the parameter list
is a limitation for the callee, not a guarantee for the caller.
Hm... at the very least, though, the compiler should generate a bug.
Otherwise 'scope' becomes useless like 'inline'.
OOPS
I meant 'warning' not 'bug', typo.