Bug 21925 – attribute inference not done on first `typeof` on member function

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-05-16T11:19:23Z
Last change time
2024-12-13T19:16:25Z
Assigned to
No Owner
Creator
ag0aep6g
Moved to GitHub: dmd#19928 →

Comments

Comment #0 by ag0aep6g — 2021-05-16T11:19:23Z
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. */
Comment #1 by robert.schadek — 2024-12-13T19:16:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19928 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB