[Issue 7038] Type mismatch with const struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 28 23:54:53 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7038
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-12-28 23:54:51 PST ---
>From http://d-programming-language.org/struct.html
> Const and Invariant Structs
>
> A struct declaration can have a storage class of const, immutable or shared.
> It has an equivalent effect as declaring each member of the struct as const,
> immutable or shared.
Then the definition of const struct A {} should translated to:
struct A { const: (members...) }
But, instead, current dmd implementation does like follows:
struct __S { int a; int b = 2; }
alias const(__S) S;
--------
But, the documentation also has some inconsistent.
See bug 7180.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list