www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24513] New: `pure` can be used as `auto`

https://issues.dlang.org/show_bug.cgi?id=24513

          Issue ID: 24513
           Summary: `pure` can be used as `auto`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: accepts-invalid, diagnostic
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com



`pure` can be used as `auto`, meaning that maybe it carries the same semantics
?



```d
module runnable;

pure p(string[] args)
{
    pure a = args.length;
    return a - a;
}

int main(string[] args)
{
    return cast(typeof(return)) p(args);
}          
```



wtf

--
Apr 19