Mercurial > projects > ldc
comparison gen/arrays.cpp @ 796:6e7a4c3b64d2
Error instead of assert when trying to build a default initializer for void[n].
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 29 Nov 2008 12:28:10 +0100 |
parents | 661384d6a936 |
children | 340acf1535d0 |
comparison
equal
deleted
inserted
replaced
795:06ba66bc0689 | 796:6e7a4c3b64d2 |
---|---|
287 else | 287 else |
288 v = arrnext->defaultInit()->toConstElem(gIR); | 288 v = arrnext->defaultInit()->toConstElem(gIR); |
289 } | 289 } |
290 | 290 |
291 if (!v) | 291 if (!v) |
292 v = DtoConstInitializer(t->nextOf(), init); | 292 v = DtoConstInitializer(arrinit->loc, t->nextOf(), init); |
293 assert(v); | 293 assert(v); |
294 | 294 |
295 inits[i] = v; | 295 inits[i] = v; |
296 if (Logger::enabled()) | 296 if (Logger::enabled()) |
297 Logger::cout() << "llval: " << *v << '\n'; | 297 Logger::cout() << "llval: " << *v << '\n'; |