Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 20, 2011 [Issue 6355] New: Template constructor cannot initialize non-mutable field | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6355 Summary: Template constructor cannot initialize non-mutable field Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: k.hara.pg@gmail.com --- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2011-07-20 02:17:09 PDT --- This is valid D2 code, but couldn't compile. ---- struct S { const int value; this()(int n){ value = n; } } void main() { S s = S(10); } ---- test.d(4): Error: can only initialize const member value inside constructor test.d(8): Error: template instance test.S.__ctor!() error instantiating ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 20, 2011 [Issue 6355] Template constructor cannot initialize non-mutable field | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6355 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-07-20 03:04:48 PDT --- https://github.com/D-Programming-Language/dmd/pull/266 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 21, 2011 [Issue 6355] Template constructor cannot initialize non-mutable field | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6355 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-07-21 12:06:05 PDT --- https://github.com/D-Programming-Language/dmd/commit/696e5b3df672dc1972c14f93f6f8f88d4559b8a9 https://github.com/D-Programming-Language/dmd/commit/9c70f902c69875e65935d72b9b6d26061cf3470f https://github.com/D-Programming-Language/dmd/commit/8469fd01c4964a1dabd1dc0848e6321b35d7e2dd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 03, 2011 [Issue 6355] Template constructor cannot initialize non-mutable field | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6355 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simendsjo@gmail.com --- Comment #3 from yebblies <yebblies@gmail.com> 2011-08-04 00:37:22 EST --- *** Issue 6427 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation