Mercurial > projects > ldc
diff dmd2/opover.c @ 847:356e65836fb5
Merged DMD 2.021 frontend.
Removed generated files from dmd/dmd2 dirs.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 13 Dec 2008 16:14:37 +0100 |
parents | f04dde6e882c |
children | 638d16625da2 |
line wrap: on
line diff
--- a/dmd2/opover.c Sat Dec 13 13:15:31 2008 +0100 +++ b/dmd2/opover.c Sat Dec 13 16:14:37 2008 +0100 @@ -12,7 +12,10 @@ #include <stdlib.h> #include <ctype.h> #include <assert.h> +#if _MSC_VER #include <complex> +#else +#endif #ifdef __APPLE__ #define integer_t dmd_integer_t @@ -548,22 +551,25 @@ goto Laggr; Laggr: -#if 0 if (arguments->dim == 1) { if (!arg->type) { - /* Look for an opNext() overload + /* Look for a head() or rear() overload */ - Dsymbol *s = search_function(ad, Id::next); - fd = s ? s->isFuncDeclaration() : NULL; + Identifier *id = (op == TOKforeach) ? Id::Fhead : Id::Ftoe; + Dsymbol *s = search_function(ad, id); + FuncDeclaration *fd = s ? s->isFuncDeclaration() : NULL; if (!fd) + { if (s && s->isTemplateDeclaration()) + break; goto Lapply; - arg->type = fd->type->next; + } + arg->type = fd->type->nextOf(); } break; } -#endif + Lapply: { /* Look for an * int opApply(int delegate(ref Type [, ...]) dg);