Mercurial > projects > ldc
diff dmd/mtype.c @ 822:43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Updated Tango patch to latest Tango revision.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 02 Dec 2008 02:45:31 +0100 |
parents | 340acf1535d0 |
children | bc982f1ad106 |
line wrap: on
line diff
--- a/dmd/mtype.c Tue Dec 02 01:44:17 2008 +0100 +++ b/dmd/mtype.c Tue Dec 02 02:45:31 2008 +0100 @@ -2979,14 +2979,6 @@ arg->defaultArg = arg->defaultArg->semantic(sc); arg->defaultArg = resolveProperties(sc, arg->defaultArg); arg->defaultArg = arg->defaultArg->implicitCastTo(sc, arg->type); - - // make sure default arguments only use variables with lower protection - // this check only catches the common case that the default arg Exp is a VarExp - if(arg->defaultArg->op == TOKvar) - { VarExp *ve = (VarExp *)arg->defaultArg; - if(ve->var->protection != PROTundefined && ve->var->protection < sc->protection) - error(loc, "default argument %s has stronger protection than function %s", ve->var->toChars(), toChars()); - } } /* If arg turns out to be a tuple, the number of parameters may