Mercurial > projects > ddmd
diff dmd/expression/Util.d @ 17:ddae60498573
Implemented mixin statements, DefaultInitExps, FileInitExps, LineInitExps and __traits.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Mon, 05 Apr 2010 03:24:08 +0100 |
parents | 5c9b78899f5d |
children | a8b50ff7f201 |
line wrap: on
line diff
--- a/dmd/expression/Util.d Sun Apr 04 22:41:11 2010 +0100 +++ b/dmd/expression/Util.d Mon Apr 05 03:24:08 2010 +0100 @@ -129,7 +129,7 @@ * 1 done */ -int overloadApply(FuncDeclaration fstart, int delegate(FuncDeclaration) dg) +int overloadApply(FuncDeclaration fstart, int delegate(void*, FuncDeclaration) dg, void* param) { FuncDeclaration f; Declaration d; @@ -141,7 +141,7 @@ if (fa) { - if (overloadApply(fa.funcalias, dg)) + if (overloadApply(fa.funcalias, dg, param)) return 1; next = fa.overnext; } @@ -166,7 +166,7 @@ d.error("is aliased to a function"); break; // BUG: should print error message? } - if (dg(f)) + if (dg(param, f)) return 1; next = f.overnext; @@ -186,7 +186,7 @@ Expression ethis; Expressions arguments; - int fp2(FuncDeclaration f) + int fp2(void*, FuncDeclaration f) { MATCH match; @@ -250,7 +250,7 @@ Type t; // type to match FuncDeclaration f; // return value - int fp1(FuncDeclaration f) + int fp1(void*, FuncDeclaration f) { if (t.equals(f.type)) { @@ -283,7 +283,7 @@ p.m = m; p.ethis = ethis; p.arguments = arguments; - overloadApply(fstart, &p.fp2); + overloadApply(fstart, &p.fp2, &p); } void templateResolve(Match* m, TemplateDeclaration td, Scope sc, Loc loc, Objects targsi, Expression ethis, Expressions arguments) @@ -1258,7 +1258,7 @@ * analogous to func.overloadResolveX(). */ - int fp3(FuncDeclaration f) + int fp3(void*, FuncDeclaration f) { TypeFunction tf = cast(TypeFunction)f.type; if (inferApplyArgTypesY(tf, arguments) == 1) @@ -1277,7 +1277,7 @@ { Param3 p3; p3.arguments = arguments; - overloadApply(fstart, &p3.fp3); + overloadApply(fstart, &p3.fp3, cast(void*)arguments); } /******************************