Mercurial > projects > dil
changeset 96:d12d31d5fc17
- Added out-contract to parseParameters().
author | aziz |
---|---|
date | Fri, 06 Jul 2007 18:49:00 +0000 |
parents | 0eb4c8a5b32b |
children | 1a83e5070a84 |
files | trunk/src/Parser.d |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Parser.d Fri Jul 06 18:37:03 2007 +0000 +++ b/trunk/src/Parser.d Fri Jul 06 18:49:00 2007 +0000 @@ -683,6 +683,16 @@ } Argument[] parseParameters() + out(args) + { + if (args.length > 1) + foreach (arg; args[0..$-1]) + { + if (arg.isVariadic()) + assert(0, "variadic arguments can only appear at the end of the parameter list."); + } + } + body { require(T.LParen);