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: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis <verylonglogin....@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: -------

Reply via email to