digitalmars.D.bugs - [Issue 7272] New: `out` section makes return type `const` in `return` statement
- d-bugmail puremagic.com (32/32) Jan 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7272
- d-bugmail puremagic.com (12/12) Jan 12 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7272
http://d.puremagic.com/issues/show_bug.cgi?id=7272 Summary: `out` section makes return type `const` in `return` statement Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: verylonglogin.reg gmail.com --- Comment #0 from Denis <verylonglogin.reg gmail.com> 2012-01-11 21:01:55 MSK --- --- int* f() out { } // no errors with `out` section body { immutable(int)* ptr; return ptr; } --- If `immutable(int)*` is changed to `immutable(void)*` we have the following error: `Error: cannot implicitly convert expression (ptr) of type immutable(void)* to const(int*)` illustrating the issue. Note, that `typeof(f())` and `typeof(return)` are `int*`. Maybe concerned with Issue 1313 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7272 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-01-12 20:29:56 PST --- I've posted a patch to fix 1313, and confirmed that this is a dup of it. *** This issue has been marked as a duplicate of issue 1313 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2012