Missed scope guard statements

Simen Kjaeraas simen.kjaras at gmail.com
Wed Mar 5 16:37:07 PST 2008


On Wed, 05 Mar 2008 23:54:35 +0100, Robert Fraser  
<fraserofthenight at gmail.com> wrote:

> Hi Steve,
>
> The place to report issues is here: http://d.puremagic.com/issues/ . You  
> need to register a bugzilla account, then click "New" on the bottom bar,  
> then "D", and enter a world of happiness and bug reporting.
>
> I would guess that in both cases, that should produce the output:
>
>   world
> hello
>
> Since the writefln("hello") is within a scope-exit, so should only fire  
> as part of the function exit condition.

Actually, "hello world" is indeed correct output, as the scope(exit) is  
executed when it exits the scope of the if{}.

The latter does indeed look like a bug, though.

-- Simen


More information about the Digitalmars-d-bugs mailing list