https://issues.dlang.org/show_bug.cgi?id=12512

--- Comment #7 from Walter Bright <[email protected]> ---
(In reply to monarchdodra from comment #6)
> That's *still* a type where "const(T) : T": "Unqual!(const(int*))" is
> "const(int)*".

Ah, you're right.

> > Not going to do a .cdup
> 
> Fine.

Because where does it stop? .sdup for shared dup? .csdup for const shared dup?
At some point, it starts looking ridiculous.

> Could we then allow "dup" to return "const(T)[]" for the cases where
> it can't return a mutable then?

I suspect that would be considered surprising behavior.

--

Reply via email to