[Issue 5193] New: SList cannot have struct elements that have immutable members.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 9 06:47:46 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5193
Summary: SList cannot have struct elements that have immutable
members.
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: zan77137 at nifty.com
--- Comment #0 from SHOO <zan77137 at nifty.com> 2010-11-09 06:46:42 PST ---
I think this code should be able to work.
-------- main.d --------
import std.container;
struct Data
{
const int val;
}
void main()
{
SList!Data list;
}
-------- Result --------
$ dmd -run main
..\std\container.d(941): Error: can only initialize c
onst member _payload inside constructor
------------------------
--
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