comparison dmd/func.c @ 1195:e961851fb8be

Merged DMD 1.042.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Fri, 03 Apr 2009 17:59:34 +0200
parents a8b9fc41c34b
children 79758fd2f48a
comparison
equal deleted inserted replaced
1194:1853dcd9b944 1195:e961851fb8be
1235 } 1235 }
1236 else 1236 else
1237 { // Call invariant virtually 1237 { // Call invariant virtually
1238 ThisExp *v = new ThisExp(0); 1238 ThisExp *v = new ThisExp(0);
1239 v->type = vthis->type; 1239 v->type = vthis->type;
1240 Expression *se = new StringExp(0, "null this"); 1240 Expression *se = new StringExp(0, (char *)"null this");
1241 se = se->semantic(sc); 1241 se = se->semantic(sc);
1242 se->type = Type::tchar->arrayOf(); 1242 se->type = Type::tchar->arrayOf();
1243 e = new AssertExp(loc, v, se); 1243 e = new AssertExp(loc, v, se);
1244 } 1244 }
1245 if (e) 1245 if (e)
2876 type = new TypeFunction(arguments, tret, varargs, LINKd); 2876 type = new TypeFunction(arguments, tret, varargs, LINKd);
2877 2877
2878 type = type->semantic(loc, sc); 2878 type = type->semantic(loc, sc);
2879 assert(type->ty == Tfunction); 2879 assert(type->ty == Tfunction);
2880 2880
2881 // Check that there is at least one argument of type uint 2881 // Check that there is at least one argument of type size_t
2882 TypeFunction *tf = (TypeFunction *)type; 2882 TypeFunction *tf = (TypeFunction *)type;
2883 if (Argument::dim(tf->parameters) < 1) 2883 if (Argument::dim(tf->parameters) < 1)
2884 { 2884 {
2885 error("at least one argument of type size_t expected"); 2885 error("at least one argument of type size_t expected");
2886 } 2886 }