Bug 22634 – assert for too many symbols should be error

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-12-28T11:08:58Z
Last change time
2022-03-29T12:37:44Z
Keywords
pull
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2021-12-28T11:08:58Z
void main() { static foreach(i; 0..65537) { } } The above code triggers an assert in src/dmd/expressionsem.d: assert(s.localNum); // 65535 should be enough for anyone I found it while reducing a different problem, so it may not be a problem in real code, but it should be a normal error instead of an assert.
Comment #1 by dlang-bot — 2021-12-28T11:24:06Z
@tim-dlang created dlang/dmd pull request #13467 "Fix issue 22634 - assert for too many symbols should be error" fixing this issue: - Fix issue 22634 - assert for too many symbols should be error https://github.com/dlang/dmd/pull/13467
Comment #2 by dlang-bot — 2021-12-29T17:33:38Z
dlang/dmd pull request #13467 "Fix issue 22634 - assert for too many symbols should be error" was merged into stable: - a08db81175c07991f32e09d6f80a05fa61d1609a by Tim Schendekehl: Fix issue 22634 - assert for too many symbols should be error https://github.com/dlang/dmd/pull/13467
Comment #3 by razvan.nitu1305 — 2022-03-29T12:37:44Z
*** Issue 22308 has been marked as a duplicate of this issue. ***