www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13049] New: in template arguments the compiler fails to parse

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

          Issue ID: 13049
           Summary: in template arguments the compiler fails to parse
                    scope for function pointers arguments
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

It's not possible to declare a function pointer type with scope arguments
within a template argument list.

enum mangle(T) = T.mangleof;
alias Func = void function(scope int);          // OK
pragma(msg, mangle!Func);                       // OK
pragma(msg, mangle!(void function(int)));       // OK
pragma(msg, mangle!(void function(scope int))); // NG

--
Jul 05 2014