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


to...@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |to...@yahoo.com
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Comment #2 from to...@yahoo.com  2008-12-17 18:36 -------
>From the docs (Const and Invariant page): "Invariant declarations can appear as
lvalues, i.e. they can have their address taken, and occupy storage."

This one works:

immutable(int)* func() {
    return &val;
}

I assume that this is supposed to work too:

ref immutable(int) func() {
    return val;
}


-- 

Reply via email to