September 16, 2003 0.72 compiler assertion | ||||
---|---|---|---|---|
| ||||
The following code produces a compiler assertion: Assertion failure: 'fieldi < ad->fields.dim' on line 126 in file 'init.c' -------- struct test { int i; const float t; } int main() { test *p=GetTest(); return true; } test * GetTest() { static test t1={i:9,t:3.15}; return &t1; } ------ If 'const' is removed from the struct, everything compiles fine.. |
Copyright © 1999-2021 by the D Language Foundation