I will add it to Bugzilla then, if it's not already there.
http://d.puremagic.com/issues/show_bug.cgi?id=10192
Bye,
bearophile
Do you know if it's OK to accept x3 assignment and refuse the a2
assignment?
struct Foo {
immutable(char)[4] bar;
}
Foo x1 = { AA };// No error.
immutable(char)[4] a1 = AA; // No error.
void main() {
Foo x2 = { AA };// No error.
Foo x3 = Foo(AA); // No
On Monday, 27 May 2013 at 18:00:38 UTC, bearophile wrote:
Do you know if it's OK to accept x3 assignment and refuse the
a2 assignment?
struct Foo {
immutable(char)[4] bar;
}
Foo x1 = { AA };// No error.
immutable(char)[4] a1 = AA; // No error.
void main() {
Foo x2 = { AA
Kenji Hara:
Thank you very much for your gentle and useful answers :-)
struct Foo {
immutable(char)[4] bar;
}
Foo x1 = { AA };// No error.
immutable(char)[4] a1 = AA; // No error.
void main() {
Foo x2 = { AA };// No error.
Foo x3 = Foo(AA); // No error.
On Tuesday, 28 May 2013 at 00:29:04 UTC, bearophile wrote:
std.typecons.Tuple supports structural assignment before the
change.
The code also works with 2.062.
I know it's not a regression. But you say:
Named-field tuple should be a subtype of unnamed-field tuple.
You can have sub-typing, or