Bug 17397 – Lazy attribute propagation incorrect

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-05-14T13:25:44Z
Last change time
2024-12-13T18:52:10Z
Assigned to
No Owner
Creator
Eyal
Moved to GitHub: dmd#19250 →

Comments

Comment #0 by eyal — 2017-05-14T13:25:44Z
In continuation to https://issues.dlang.org/show_bug.cgi?id=16540, these are still buggy: void foo(scope lazy int* f) @nogc {} void vararg_foo(Args...)(scope lazy Args args) @nogc {} // Compiles fine void bar1() @nogc { foo(new int(5)); } // Incorrectly fails! void bar2() @nogc { int* f() { return new int(5); } foo(f()); // f() should not be called here! } // Incorrectly fails! void bar3(scope lazy int* x) @nogc { vararg_foo(x); // x should not be evaluated here! }
Comment #1 by greeenify — 2017-05-16T02:55:40Z
Comment #2 by robert.schadek — 2024-12-13T18:52:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19250 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB