Thread overview
[Issue 10947] New: const out parameter is not properly rejected
Sep 02, 2013
Kenji Hara
Sep 02, 2013
Kenji Hara
Oct 01, 2013
Andrej Mitrovic
September 02, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10947

           Summary: const out parameter is not properly rejected
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          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> 2013-09-01 18:57:31 PDT ---
Reduced test case:

struct S {}

void foo(const out S) {}  // correctly rejected: "Error: out cannot be const"

alias SC = const S;
void bar(out SC) {}       // NG, no error occurs

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 02, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10947


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-01 19:23:09 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2511

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 01, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10947



--- Comment #2 from github-bugzilla@puremagic.com 2013-10-01 04:20:44 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/55decc97e5d059684e20c6dcd6a66aaa8b497f6f fix Issue 10947 - const out parameter is not properly rejected

Bitwise-and of Type::mod vs STCxxx is merely a mistake.

Additionally, `out inout` parameter should also be rejected.

https://github.com/D-Programming-Language/dmd/commit/e0a201bbf80fb7bfbc7e5caf2c29921c3bddf5e3 Merge pull request #2511 from 9rnsr/fix10947

Issue 10947 - const out parameter is not properly rejected

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 01, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10947


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------