Mercurial > projects > ddmd
diff dmd/expression/Util.d @ 156:0c8cc2a10f99
+ ArrayInitializer.toAssocArrayLiteral()
+ FuncDeclaration.isUnique()
+ TypeEnum.alignsize()
+ TypeEnum.toChars()
+ TypeEnum.getProperty()
+ VarExp.equals()
+ expression.Util.fpunique()
* fixed missing default in TypeBasic
author | trass3r |
---|---|
date | Wed, 15 Sep 2010 18:24:39 +0200 |
parents | ea6325d0edd9 |
children | b7b61140701d |
line wrap: on
line diff
--- a/dmd/expression/Util.d Wed Sep 15 17:31:22 2010 +0200 +++ b/dmd/expression/Util.d Wed Sep 15 18:24:39 2010 +0200 @@ -136,7 +136,6 @@ * 0 continue * 1 done */ - int overloadApply(FuncDeclaration fstart, int delegate(void*, FuncDeclaration) dg, void* param) { FuncDeclaration f; @@ -185,6 +184,23 @@ } /******************************************** + * If there are no overloads of function f, return that function, + * otherwise return NULL. + */ +static int fpunique(void *param, FuncDeclaration f) +{ FuncDeclaration *pf = cast(FuncDeclaration *)param; + + if (*pf) + { *pf is null; + return 1; // ambiguous, done + } + else + { *pf = f; + return 0; + } +} + +/******************************************** * Decide which function matches the arguments best. */