https://issues.dlang.org/show_bug.cgi?id=18561
Steven Schveighoffer changed:
What|Removed |Added
Status|RESOLVED|REOPENED
CC|
https://issues.dlang.org/show_bug.cgi?id=18561
Steven Schveighoffer changed:
What|Removed |Added
Hardware|x86 |All
OS|Windows
https://issues.dlang.org/show_bug.cgi?id=18561
--- Comment #3 from anonymous4 ---
This passes:
---
struct A
{
int a;
this(int b) const { a=b; }
}
int main()
{
const A a;
assert(a.a==0,"0");
a.__ctor(1);
assert(a.a==1,"1");
return 0;
}
---
--
https://issues.dlang.org/show_bug.cgi?id=18561
--- Comment #4 from ajiesk...@gmail.com ---
(In reply to anonymous4 from comment #3)
> This passes:
> ---
> struct A
> {
> int a;
> this(int b) const { a=b; }
> }
> int main()
> {
> const A a;
> assert(a.a==0,"0");
> a.__ctor(1);
>
https://issues.dlang.org/show_bug.cgi?id=18561
--- Comment #5 from Steven Schveighoffer ---
(In reply to anonymous4 from comment #3)
> a.__ctor(1);
This is another bug. One should only be able to call const __ctor on a struct
once, before using it.
--
https://issues.dlang.org/show_bug.cgi?id=18561
--- Comment #6 from anonymous4 ---
(In reply to Steven Schveighoffer from comment #2)
> This does not address postblits being called on const data types (with
> `this` being mutable during the postblit). That is a different bug.
I thought you meant t
https://issues.dlang.org/show_bug.cgi?id=18561
RazvanN changed:
What|Removed |Added
Status|REOPENED|RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=18561
--- Comment #8 from Ate Eskola ---
And the issue is in practice solved by copy constructors anyway, thanks to you
:). They didn't exist when I raised this issue but now they do.
--