[Issue 3557] Struct constructors cannot be declared as pure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 12 02:20:32 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3557
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Pure function cannot call |Struct constructors cannot
|struct constructor |be declared as pure
--- Comment #4 from Don <clugdbug at yahoo.com.au> 2010-01-12 02:20:30 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > This compiles. Should it?
>
> I'm now confident it shouldn't:
>
> string global;
> class A {
> float f;
> this (float f) { // NOT pure
> this.f = f;
> global = "BUGABUGA!";
> }
> static pure A stworz(float f) {
> return new A(f);
> }
> }
That's bug 3573.
--
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