www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13540] New: Meaningless alias declaration is accepted

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

          Issue ID: 13540
           Summary: Meaningless alias declaration is accepted
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: k.hara.pg gmail.com

The alias declaration:

   alias int[] f(TemplateTypeParam)(int arg);

is just treated as:

   alias int[] f(int arg);
   static assert(is(f* == int[] function(int));

and the redundant template parameter list is just ignored.

--
Sep 27 2014