Bug 13520 – Redundant static variable cannot be read error

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-09-23T10:04:51Z
Last change time
2024-12-13T18:28:40Z
Keywords
diagnostic
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18887 →

Comments

Comment #0 by bearophile_hugs — 2014-09-23T10:04:51Z
int n = 2; void main() { int[n][2][2][2] a; } dmd 2.067alpha gives: test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time test.d(3,21): Error: static variable n cannot be read at compile time
Comment #1 by robert.schadek — 2024-12-13T18:28:40Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18887 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB