[Issue 20087] New: `scope` not parsed for types in template argument lists
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 27 04:07:42 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20087
Issue ID: 20087
Summary: `scope` not parsed for types in template argument
lists
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: slavo5150 at yahoo.com
```
template __externC(RT, P...)
{
alias __externC = extern(C) RT function(P);
}
extern(C) void* test(scope const char*);
static assert(is(typeof(&test) == __externC!(void*, scope const char*)));
```
Last line fails with:
Error: expression expected, not scope
Error: found const when expecting ) following template argument list
Error: found char when expecting )
Error: expression expected, not )
Error: found ) when expecting ;
--
More information about the Digitalmars-d-bugs
mailing list