> I agree with that, but...
> I think the new behaviour is a misfeature, and nothing more. It makes no
> sense to store a value in each struct, when the value is exactly the same
> every time.
> My assert: 100% of these cases are bugs.

It is not:

struct S
{
const int x;
this(int ax)
{
x = ax;
}
}

void main()
{
import std.stdio;
writeln(S(41));
writeln(S(42));
}

You kind of propose that "const int" to be a completely different type
depending on initialiser. It is horrible.
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to