1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 09:39:40 +00:00

turned redeclartion of local variables from an error into a warning

This commit is contained in:
Marc Zinnschlag 2013-05-01 14:20:09 +02:00
parent 63407a662c
commit fe038cef03

View file

@ -98,10 +98,12 @@ namespace Compiler
if (type!=' ')
{
getErrorHandler().error ("catoLowern't re-declare local variable", loc);
/// \todo add option to make re-declared local variables an error
getErrorHandler().warning ("can't re-declare local variable", loc);
SkipParser skip (getErrorHandler(), getContext());
scanner.scan (skip);
return false;
mState = EndState;
return true;
}
mLocals.declare (mState==ShortState ? 's' : (mState==LongState ? 'l' : 'f'),