diff gen/toir.cpp @ 397:9ec89aad9dbc

Make an unresolved global into an error instead of an assert. Fixes nocompile/alias_28_A/F.
author Christian Kamm <kamm incasoftware de>
date Sat, 26 Jul 2008 15:23:15 +0200
parents 3f98d46e05a4
children 0e6b4d65d3f8
line wrap: on
line diff
--- a/gen/toir.cpp	Sat Jul 26 15:12:48 2008 +0200
+++ b/gen/toir.cpp	Sat Jul 26 15:23:15 2008 +0200
@@ -244,9 +244,9 @@
                 DtoConstInitGlobal(vd);
             }
             if (!vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) {
-                Logger::println("global variable not resolved :/ %s", vd->toChars());
-                Logger::cout() << *DtoType(vd->type) << '\n';
-                assert(0);
+                error("global variable %s not resolved", vd->toChars());
+                Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n';
+                fatal();
             }
             return new DVarValue(vd, vd->ir.getIrValue(), true);
         }