On Tuesday, May 24, 2016 10:10:16 Steven Schveighoffer via Digitalmars-d-learn 
wrote:
> A while ago, I discovered that this works.
>
> class C {
>     union
>     {
>        private int _my_var;
>        public const int my_var;
>     }
>     void do_something() { _my_var = 4; }
> }

Yeah. That's basically what Rebindable does, though in its case, it's not
really allowing you to mutate any data, just what the reference refers to.
Regardless, it does seem like a hole in the type system.

- Jonathan M Davis

Reply via email to