[Issue 7272] New: `out` section makes return type `const` in `return`	statement
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jan 11 10:01:56 PST 2012
    
    
  
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 at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis <verylonglogin.reg at 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list