Bug 13049 – in template arguments the compiler fails to parse scope for function pointers arguments
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-05T18:56:00Z
Last change time
2015-06-17T21:03:50Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2014-07-05T18:56:20Z
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