[Issue 5193] SList cannot have struct elements that have immutable members.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 19 09:36:30 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5193
chuck <chuck.sonic at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chuck.sonic at gmail.com
--- Comment #1 from chuck <chuck.sonic at gmail.com> 2010-11-19 09:35:14 PST ---
WARNING: N00B ALERT! Similar issues with Array and/or SList initializer?
Similar but slightly different:
-------- main.d --------
import std.container;
void main() {
auto aList = Array!string();
}
-------- Result --------
$ dmd -run main
/opt/dmd2/bin/../../src/phobos/std/container.d(1536): Error: this for _data
needs to be type Array not type Payload
/opt/dmd2/bin/../../src/phobos/std/container.d(1537): Error: this for _data
needs to be type Array not type Payload
/opt/dmd2/bin/../../src/phobos/std/container.d(1538): Error: this for _data
needs to be type Array not type Payload
------------------------
Different but slightly similar:
-------- main.d --------
import std.container;
void main() {
auto s = SList!string("hello");
}
-------- Result --------
$ dmd -run main
main.d(5): Error: template std.container.SList!(string).SList.__ctor(U) if
(isImplicitlyConvertible!(U,T)) does not match any function template
declaration
main.d(5): Error: template std.container.SList!(string).SList.__ctor(U) if
(isImplicitlyConvertible!(U,T)) cannot deduce template function from argument
types !()(string)
------------------------
--
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