Bug 11411 – Disallow non pure lazy expressions in pure functions

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-01T09:38:46Z
Last change time
2024-12-13T18:13:30Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Denis Shelomovskii
Moved to GitHub: dmd#17621 →

Comments

Comment #0 by verylonglogin.reg — 2013-11-01T09:38:46Z
As `lazy` expressions are like a `scope delegate` pure functions should reject inpure `lazy` expressions just like inpure delegates: --- void f() { } void g(lazy void p) pure { p; } void main() { g(f()); } // compiles, should fail ---
Comment #1 by robert.schadek — 2024-12-13T18:13:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17621 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB