[Issue 21925] New: attribute inference not done on first `typeof` on member function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 16 11:19:23 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21925
Issue ID: 21925
Summary: attribute inference not done on first `typeof` on
member function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ag0aep6g at gmail.com
struct S
{
static f() {}
}
alias T1 = typeof(&S.f);
alias T2 = typeof(&S.f);
pragma(msg, T1); /* Prints "void function()". Should print the same as below.
*/
pragma(msg, T2); /* Prints "void function() pure nothrow @nogc @safe". */
static assert(is(T1 == T2)); /* Fails. Should pass. */
static assert(is(T1 == void function() pure nothrow @nogc @safe)); /* Fails.
Should pass. */
--
More information about the Digitalmars-d-bugs
mailing list