Bug 12369 – Defer semantic2 and semantic3 of function local symbols until the end of enclosing function

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-14T23:38:53Z
Last change time
2024-12-13T18:18:20Z
Assigned to
No Owner
Creator
Kenji Hara
Moved to GitHub: dmd#18795 →

Comments

Comment #0 by k.hara.pg — 2014-03-14T23:38:53Z
Currently this code fails to compile by the forward reference of foo. auto foo(int) { static struct Bar { // [A] void spam() { foo(1); } } return Bar(); } Because the semantic2 and 3 of the struct Bar is immediately invoked at the declaration point [A]. But, essentially it could be compiled, by deferring the semantic2/3 after the finishing semantic3 of foo.
Comment #1 by robert.schadek — 2024-12-13T18:18:20Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18795 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB