[Issue 15795] New: bogus "conflicts with" error depending on order of declaration
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon Mar 14 03:13:34 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15795
          Issue ID: 15795
           Summary: bogus "conflicts with" error depending on order of
                    declaration
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com
dmd rejects this:
----
template Foo(T : int) {}
template Bar(T) {}
alias Bar = Foo; /* test.d(3): Error: alias test.Bar conflicts with template
test.Bar(T) at test.d(2) */
----
But swap lines 2 and 3, and dmd accepts it:
----
template Foo(T : int) {}
alias Bar = Foo;
template Bar(T) {} /* no problem */
----
--
    
    
More information about the Digitalmars-d-bugs
mailing list