Fix error reporting source code format

This commit is contained in:
a3d4
2020-05-07 04:46:02 +02:00
parent 5e46ef7df5
commit 7e1835af71
3 changed files with 8 additions and 5 deletions
+3 -3
View File
@@ -493,7 +493,8 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
unsupportedTypes.emplace_back(param->toString());
if (!unsupportedTypes.empty())
m_errorReporter.typeError(
2763_error,_variable.location(),
2763_error,
_variable.location(),
"The following types are only supported for getters in ABIEncoderV2: " +
joinHumanReadable(unsupportedTypes) +
". Either remove \"public\" or use \"pragma experimental ABIEncoderV2;\" to enable the feature."
@@ -3125,8 +3126,7 @@ void TypeChecker::requireLValue(Expression const& _expression, bool _ordinaryAss
if (_expression.annotation().isLValue)
return;
return m_errorReporter.typeError(
1123_error,_expression.location(), [&]() {
return m_errorReporter.typeError(1123_error, _expression.location(), [&]() {
if (_expression.annotation().isConstant)
return "Cannot assign to a constant variable.";