[Issue 10008] New: Inconsistent inference of template and	non-template function attributes
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Apr 29 06:12:27 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=10008
           Summary: Inconsistent inference of template and non-template
                    function attributes
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: maxim at maxim-fomin.ru
--- Comment #0 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-04-29 06:12:26 PDT ---
struct S()
{
    void foo(){}
}
struct Z
{
    void foo(){}
}
void main() @safe
{
    auto x = &Z.foo;
    auto y = &S!().foo;
    pragma(msg, typeof(x));
    pragma(msg, typeof(y));
    x();
    y();
}
Member function of templated struct is deduced to be pure nothrow @safe while
non-templated struct function is not. Either both should be rejected or none of
them.
-- 
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