changeset 333:f7190d9eb70c trunk

[svn r354] Fix the regressions between [346] and [353] by making constructors and destructors outside classes fatal errors. Fix tests makefile and add minimize to gc.d.
author ChristianK
date Sat, 12 Jul 2008 09:23:14 +0200
parents d7e6ace5cca4
children 20446d22f832
files dmd/func.c tests/testincludes/Makefile tests/testincludes/std/gc.d
diffstat 3 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/func.c	Fri Jul 11 22:33:21 2008 +0200
+++ b/dmd/func.c	Sat Jul 12 09:23:14 2008 +0200
@@ -2208,6 +2208,7 @@
     if (!cd)
     {
 	error("constructors are only for class definitions");
+	fatal();
 	tret = Type::tvoid;
     }
     else
@@ -2302,6 +2303,7 @@
     if (!cd)
     {
 	error("destructors only are for class definitions");
+	fatal();
     }
     else
 	cd->dtors.push(this);
--- a/tests/testincludes/Makefile	Fri Jul 11 22:33:21 2008 +0200
+++ b/tests/testincludes/Makefile	Sat Jul 12 09:23:14 2008 +0200
@@ -70,7 +70,7 @@
 tangobos.lib : $(LIB_TARGET)
 
 $(LIB_TARGET) : $(ALL_OBJS)
-	$(RM) $@
+	$(RM) $(LIB_MASK)
 	$(LLVMLINK) -o=$(LIB_TARGET).bc `find -name "*.bc"`
 	$(LLC) -o=$(LIB_TARGET).s $(LIB_TARGET).bc
 	$(CC) -c -o $(LIB_TARGET) $(LIB_TARGET).s
--- a/tests/testincludes/std/gc.d	Fri Jul 11 22:33:21 2008 +0200
+++ b/tests/testincludes/std/gc.d	Sat Jul 12 09:23:14 2008 +0200
@@ -194,7 +194,10 @@
 /**
  * Minimizes physical memory usage
  */
-//void minimize();
+void minimize()
+{
+    GC.collect();
+}
 
 /***************************************
  * disable() temporarily disables garbage collection cycle, enable()