Allowing primitive type »objects« for compatibility.

This commit is contained in:
Patrick Lühne 2016-06-10 16:46:02 +02:00
parent 9f0e784a4a
commit 20b40d3e1c

View File

@ -121,8 +121,11 @@ PrimitiveType *PrimitiveType::parseAndFind(Context &context, Domain &domain)
if (match == types.cend()) if (match == types.cend())
{ {
// Only "object" is allowed as an implicit type // Only "object" is allowed as an implicit type
if (typeName == "object") if (typeName == "object" || typeName == "objects")
{
context.logger.parserWarning(context.parser, "Primitive type \"" + typeName + "\" should be declared");
types.emplace_back(std::make_unique<expressions::PrimitiveType>(typeName)); types.emplace_back(std::make_unique<expressions::PrimitiveType>(typeName));
}
else else
throw utils::ParserException(context.parser, "Type \"" + typeName + "\" used but never declared"); throw utils::ParserException(context.parser, "Type \"" + typeName + "\" used but never declared");