[Issue 19744] New: Confusing error message when annotating a non-member function with `return`
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Mar 16 07:16:06 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19744
          Issue ID: 19744
           Summary: Confusing error message when annotating a non-member
                    function with `return`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: monkeyworks12 at hotmail.com
@safe
int* test(return scope int* n) return
{
    return n;
}
This prints a mildly nonsensical error message:
Error: function `test` static member has no this to which return can apply
Specifically, it is the "function `test` static member` part which is
confusing.
--
    
    
More information about the Digitalmars-d-bugs
mailing list