Comment #0 by leandro.lucarella — 2011-11-01T04:15:25Z
This is in DMD 1.071:
$ cat t.d
void f() {
for (int i = 0; i < x.length; i++) {
}
}
$ dmd -c t.d
t.d(2): Error: undefined identifier x, did you mean function f?
_error_ 0x8edf468
dmd: expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed.
Aborted
Comment #1 by leandro.lucarella — 2011-11-01T04:21:42Z
An even simpler testcase:
void f() {
while (x.length) {
}
}
Comment #2 by leandro.lucarella — 2011-11-01T04:22:11Z
BTW, compiling DMD in "debug mode" hides the assertion :S
Comment #3 by leandro.lucarella — 2011-11-01T04:29:45Z
OK, it seems that only the makefile is broken, after rebuilding all DMD I can't reproduce the bug anymore.
I guess some files weren't rebuilt after I updated the git repo and that's what was causing the problem.