diff dmd/func.c @ 1530:05c235309d6f

Make the auto storage class never have the same meaning as scope. This changes the meaning of auto class MyClass {} and auto MyClass ident; Both have been made an error to prevent accidents.
author Christian Kamm <kamm incasoftware de>
date Sun, 12 Jul 2009 16:15:21 +0200
parents d9c5f5a43403
children def7a1d494fd
line wrap: on
line diff
--- a/dmd/func.c	Fri Jul 10 21:30:02 2009 +0200
+++ b/dmd/func.c	Sun Jul 12 16:15:21 2009 +0200
@@ -184,7 +184,7 @@
 	error("_ctor is reserved for constructors");
 
     if (isConst() || isAuto() || isScope())
-	error("functions cannot be const or auto");
+	error("functions cannot be const, auto or scope");
 
     if (isAbstract() && !isVirtual())
 	error("non-virtual functions cannot be abstract");
@@ -960,7 +960,7 @@
 		    loc = fensure->loc;
 
 		v = new VarDeclaration(loc, type->nextOf(), outId, NULL);
-		v->noauto = 1;
+		v->noscope = 1;
 		sc2->incontract--;
 		v->semantic(sc2);
 		sc2->incontract++;