Bug 9146 – Errors in gagged forward reference declarations are detected too late.

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-13T01:02:24Z
Last change time
2024-12-13T18:03:17Z
Keywords
pull
Assigned to
No Owner
Creator
Don
Moved to GitHub: dmd#18503 →

Comments

Comment #0 by clugdbug — 2012-12-13T01:02:24Z
All three of these test cases from bug 4269 correctly generate errors, but the errors occur only in the glue layer. static if(is(typeof(X7))) {} Y7 X7; static if(is(typeof(X11.init))) {} const { Y11 X11; } static if(is(typeof(X12.init))) {} enum X12 = Y12; ---- zoo.d(18): Error: variable zoo.X7 had semantic errors when compiling zoo.d(22): Error: variable zoo.X11 had semantic errors when compiling zoo.d(26): Error: variable zoo.X12 had semantic errors when compiling ---- They should instead give error messages referring to the undefined Y7, Y11, Y12.
Comment #1 by dlang-bot — 2022-09-15T12:50:51Z
@RazvanN7 updated dlang/dmd pull request #14433 "Fix Issue 9146 - Errors in gagged forward reference declarations are …" fixing this issue: - Fix Issue 9146 - Errors in gagged forward reference declarations are detected too late. https://github.com/dlang/dmd/pull/14433
Comment #2 by robert.schadek — 2024-12-13T18:03:17Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18503 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB