diff dmd/declaration.c @ 1362:194852badf8c

Don't always expand aliases to FuncDecls to FuncAliasDecls - breaks for single functions.
author Christian Kamm <kamm incasoftware de>
date Sat, 16 May 2009 14:22:09 +0200
parents 78038e540342
children 8026319762be
line wrap: on
line diff
--- a/dmd/declaration.c	Sat May 16 12:17:33 2009 +0200
+++ b/dmd/declaration.c	Sat May 16 14:22:09 2009 +0200
@@ -502,16 +502,16 @@
 	FuncDeclaration *f = s->toAlias()->isFuncDeclaration();
 	if (f)
 	{
-	    FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
-	    fa->importprot = importprot;
 	    if (overnext)
 	    {
+		FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
+		fa->importprot = importprot;
 		if (!fa->overloadInsert(overnext))
 		    ScopeDsymbol::multiplyDefined(0, f, overnext);
 		overnext = NULL;
+		s = fa;
+		s->parent = sc->parent;
 	    }
-	    s = fa;
-	    s->parent = sc->parent;
 	}
 	if (overnext)
 	    ScopeDsymbol::multiplyDefined(0, s, overnext);