Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 16, 2012 [Issue 9035] New: Nested struct `init` is lvalue and can be modified | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9035 Summary: Nested struct `init` is lvalue and can be modified Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: verylonglogin.reg@gmail.com --- Comment #0 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2012-11-16 15:56:27 MSK --- --- struct S { } void f(T)(auto ref T t) { static assert(!__traits(isRef, t)); } void main() { f(S.init); // ok, rvalue f(S()); // ok, rvalue int i; struct Nested { int j = 0; void f() { ++i; } } f(Nested()); // ok, rvalue f(Nested.init); // fails, lvalue assert(Nested.init.j == 0); (ref n) { n.j = 5; }(Nested.init); assert(Nested.init.j == 0); // fails, j is 5 } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 19, 2012 [Issue 9035] Nested struct `init` is lvalue and can be modified | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Shelomovskij | http://d.puremagic.com/issues/show_bug.cgi?id=9035 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-11-18 21:48:41 PST --- https://github.com/D-Programming-Language/dmd/pull/1301 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 04, 2012 [Issue 9035] Nested struct `init` is lvalue and can be modified | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Shelomovskij | http://d.puremagic.com/issues/show_bug.cgi?id=9035 --- Comment #2 from github-bugzilla@puremagic.com 2012-12-03 20:58:34 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a5514dd6ed97646abe3d0f32631d22ef42f58f99 fix Issue 9035 - Nested struct `init` is lvalue and can be modified https://github.com/D-Programming-Language/dmd/commit/3b061322300c5b7a39f1b5c5f76016a4d9906899 Merge pull request #1301 from 9rnsr/fix9035 Issue 9035 & 9036 - Nested struct `init` is lvalue and can be modified -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 04, 2012 [Issue 9035] Nested struct `init` is lvalue and can be modified | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Shelomovskij | http://d.puremagic.com/issues/show_bug.cgi?id=9035 --- Comment #3 from github-bugzilla@puremagic.com 2012-12-03 22:01:08 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/acf8a8934dff6b9cdfcc4d5f98b9b5c242b11ebd fixup for pull #1301 and #1309 By fixing bug 9069 and 9035, T.init always returns rvalue and ref cannot receive it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 05, 2012 [Issue 9035] Nested struct `init` is lvalue and can be modified | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Shelomovskij | http://d.puremagic.com/issues/show_bug.cgi?id=9035 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- 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