Bug 23287 – Invalid @nogc code succeeds when compiling with -o-

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-08-08T17:21:40Z
Last change time
2024-12-13T19:24:07Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Iain Buclaw
See also
https://issues.dlang.org/show_bug.cgi?id=23112
Moved to GitHub: dmd#18119 →

Comments

Comment #0 by ibuclaw — 2022-08-08T17:21:40Z
This is issue 23112, but for when compiling with dmd -o- --- struct Forward(alias F) { auto call()() { return F(); } } auto bar(int a) @nogc nothrow @safe { auto f() { return a; } return Forward!f(); } extern(C) void main() @nogc { assert(bar(3).call() == 3); }
Comment #1 by robert.schadek — 2024-12-13T19:24:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18119 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB