http://d.puremagic.com/issues/show_bug.cgi?id=5541


yebblies <yebbl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebbl...@gmail.com
         Resolution|                            |INVALID


--- Comment #1 from yebblies <yebbl...@gmail.com> 2012-02-01 15:25:08 EST ---
(In reply to comment #0)
> But this code compiles and runs with no errors with DMD 2.051. I think DMD has
> to statically disallow code like this too:
> 
> 
> struct Foo {
>     int x;
> }
> Foo* bar() {
>     return &(Foo(1));
> }
> void main() {}

Believe it or not, this is valid code.  In D struct literals are currently
lvalues, and not allocated on the stack at all.  See issue 5889.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to