[Issue 16139] New: Attributes of functions inside templates should be inferred
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Jun  7 23:05:38 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=16139
          Issue ID: 16139
           Summary: Attributes of functions inside templates should be
                    inferred
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com
This should work for the same reason that template functions get their
attributes inferred:
template Mine()
{
    void foo()
    {
    }
}
@safe bar()
{
    Mine!().foo();
}
dmd test5
test.d(11): Error: safe function 'test.bar' cannot call system function
'test.Mine!().foo'
--
    
    
More information about the Digitalmars-d-bugs
mailing list