Don't allow "ignore where" for groups when there's no "assign where"

fixes #9554
This commit is contained in:
Michael Friedrich 2015-07-16 13:55:53 +02:00 committed by Gunnar Beutner
parent d4b31bbd0a
commit 92aa963de4
1 changed files with 2 additions and 0 deletions

View File

@ -498,6 +498,8 @@ object:
} else if (seen_ignore) {
if (!ObjectRule::IsValidSourceType(type))
BOOST_THROW_EXCEPTION(ScriptError("object rule 'ignore' cannot be used for type '" + type + "'", DebugInfoRange(@2, @4)));
else
BOOST_THROW_EXCEPTION(ScriptError("object rule 'ignore' is missing 'assign' for type '" + type + "'", DebugInfoRange(@2, @4)));
}
$$ = new ObjectExpression(abstract, type, $4, filter, context->GetZone(), $5, $6, DebugInfoRange(@2, @5));