[Issue 13520] New: Redundant static variable cannot be read error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Sep 23 03:04:51 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13520

          Issue ID: 13520
           Summary: Redundant static variable cannot be read error
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

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

--


More information about the Digitalmars-d-bugs mailing list