Fix internal error for invalid data location in constructor.

This commit is contained in:
chriseth
2020-07-27 15:00:17 +02:00
parent 56e4e9f0af
commit f24097c38d
3 changed files with 10 additions and 2 deletions
@@ -324,7 +324,9 @@ void DeclarationTypeChecker::endVisit(VariableDeclaration const& _variable)
", ",
" or "
);
if (_variable.isCallableOrCatchParameter())
if (_variable.isConstructorParameter())
errorString += " for constructor parameter";
else if (_variable.isCallableOrCatchParameter())
errorString +=
" for " +
string(_variable.isReturnParameter() ? "return " : "") +