[Issue 3449] const and invariant struct members do not behave according to spec
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 11 18:28:45 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3449
Masahiro Nakagawa <repeatedly at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |repeatedly at gmail.com
--- Comment #13 from Masahiro Nakagawa <repeatedly at gmail.com> 2012-05-11 18:30:07 PDT ---
I hit this issue in my new library.
I have a following struct.
struct Option
{
string name;
string[] fields;
immutable type = "hoge";
}
My library automatically converts such struct to JSON.
But "type" field does not exist (tupleof does not return immutable field).
expect:
{"fields": ["a'], "unique": false, "type": "hoge"}
actual:
{"fields": ["a'], "unique": false}
Currently, I remove immutable keyword temporally but 'type' should be
immutable.
Is there a better solution?
--
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