Thread overview | |||||
---|---|---|---|---|---|
|
November 09, 2011 [Issue 6919] New: [CTFE] Cannot get effect to local variable through its pointer | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6919 Summary: [CTFE] Cannot get effect to local variable through its pointer Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW 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-11-09 03:27:55 PST --- void formattedRead(int* val) { *val = 1; } void test() { int n; formattedRead(&n); assert(n == 1); // fails! } static assert({ test(); return true; }()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 09, 2011 [Issue 6919] [CTFE] Cannot get effect to local variable through its pointer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6919 --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-11-09 04:52:09 PST --- Similar code. void formattedRead(string* val) { *val = "1"; } void test() { string val; formattedRead(&val); assert(val == "1"); } static assert({ test(); return true; }()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 16, 2011 [Issue 6919] [CTFE] Cannot get effect to local variable through its pointer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6919 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-11-16 11:54:13 PST --- https://github.com/D-Programming-Language/dmd/commit/beef649d9b19ce21e75f3d496af0a67844698c41 https://github.com/D-Programming-Language/dmd/commit/469b82d4ced0f6c7efc79f3f9953da83f2f87e63 -- 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