Disallow constructor arguments given multiple times.

This commit is contained in:
chriseth
2018-06-29 16:11:21 +02:00
parent e289c36158
commit f69e24c85e
9 changed files with 14 additions and 22 deletions
+5 -14
View File
@@ -335,8 +335,6 @@ void TypeChecker::annotateBaseConstructorArguments(
ASTNode const* _argumentNode
)
{
bool const v050 = _currentContract.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050);
solAssert(_baseConstructor, "");
solAssert(_argumentNode, "");
@@ -365,18 +363,11 @@ void TypeChecker::annotateBaseConstructorArguments(
ssl.append("Second constructor call is here: ", previousNode->location());
}
if (v050)
m_errorReporter.declarationError(
*mainLocation,
ssl,
"Base constructor arguments given twice."
);
else
m_errorReporter.warning(
*mainLocation,
"Base constructor arguments given twice.",
ssl
);
m_errorReporter.declarationError(
*mainLocation,
ssl,
"Base constructor arguments given twice."
);
}
}