diff dmd/class.c @ 1103:b30fe7e1dbb9

- Updated to DMD frontend 1.041. - Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Thu, 12 Mar 2009 20:37:27 +0100
parents 330f999ade44
children 1860414bf3b7
line wrap: on
line diff
--- a/dmd/class.c	Thu Mar 12 14:08:57 2009 +0100
+++ b/dmd/class.c	Thu Mar 12 20:37:27 2009 +0100
@@ -13,7 +13,7 @@
 #include <assert.h>
 
 #include "root.h"
-#include "mem.h"
+#include "rmem.h"
 
 #include "enum.h"
 #include "init.h"
@@ -857,7 +857,9 @@
     {
 	for (size_t i = 0; i < vtbl->dim; i++)
 	{
-	    FuncDeclaration *fd = (FuncDeclaration *)vtbl->data[i];
+	    FuncDeclaration *fd = ((Dsymbol*)vtbl->data[i])->isFuncDeclaration();
+	    if (!fd)
+		continue;		// the first entry might be a ClassInfo
 
 	    //printf("\t[%d] = %s\n", i, fd->toChars());
 	    if (ident == fd->ident &&