July 27, 2019 [Issue 20087] New: `scope` not parsed for types in template argument lists | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: slavo5150@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 ; -- |
Copyright © 1999-2021 by the D Language Foundation