www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15592] New: Template specializations don't work in nested scope

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

          Issue ID: 15592
           Summary: Template specializations don't work in nested scope
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: acehreli yahoo.com

void main(){
    void foo(T)() {
    }

    void foo(T : int)() {
    }

    struct S(T) {
    }

    struct S(T : int) {
    }
}

Error: declaration foo(T : int)() is already defined
Error: declaration S(T : int) is already defined

--
Jan 22