[Issue 17864] POD struct not equivalent to primitive type in comparison

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 2 15:36:58 UTC 2017


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

Duncan Paterson <dunkyp at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dunkyp at gmail.com

--- Comment #1 from Duncan Paterson <dunkyp at gmail.com> ---
I don't think this is an oversight. The table at
https://dlang.org/spec/const3.html in section 18.11 says that shared cannot be
implicitly converted to mutable. The same code as yours with b marked immutable
works. I do think this behaviour is a little surprising.

--


More information about the Digitalmars-d-bugs mailing list