@@ -1420,7 +1420,7 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
14201420 {
14211421 requireLValue (
14221422 *component,
1423- * _tuple.annotation ().lValueOfOrdinaryAssignment
1423+ _tuple.annotation ().lValueOfOrdinaryAssignment
14241424 );
14251425 types.push_back (type (*component));
14261426 }
@@ -1534,6 +1534,7 @@ bool TypeChecker::visit(UnaryOperation const& _operation)
15341534 _operation.annotation ().isConstant = false ;
15351535 _operation.annotation ().isPure = !modifying && *_operation.subExpression ().annotation ().isPure ;
15361536 _operation.annotation ().isLValue = false ;
1537+
15371538 return false ;
15381539}
15391540
@@ -2391,6 +2392,7 @@ bool TypeChecker::visit(FunctionCallOptions const& _functionCallOptions)
23912392
23922393 _functionCallOptions.annotation ().isPure = false ;
23932394 _functionCallOptions.annotation ().isConstant = false ;
2395+ _functionCallOptions.annotation ().isLValue = false ;
23942396
23952397 auto expressionFunctionType = dynamic_cast <FunctionType const *>(type (_functionCallOptions.expression ()));
23962398 if (!expressionFunctionType)
@@ -2523,6 +2525,7 @@ void TypeChecker::endVisit(NewExpression const& _newExpression)
25232525 solAssert (!!type, " Type name not resolved." );
25242526
25252527 _newExpression.annotation ().isConstant = false ;
2528+ _newExpression.annotation ().isLValue = false ;
25262529
25272530 if (auto contractName = dynamic_cast <UserDefinedTypeName const *>(&_newExpression.typeName ()))
25282531 {
@@ -2583,7 +2586,10 @@ void TypeChecker::endVisit(NewExpression const& _newExpression)
25832586 _newExpression.annotation ().isPure = true ;
25842587 }
25852588 else
2589+ {
2590+ _newExpression.annotation ().isPure = false ;
25862591 m_errorReporter.fatalTypeError (8807_error, _newExpression.location (), " Contract or array type expected." );
2592+ }
25872593}
25882594
25892595bool TypeChecker::visit (MemberAccess const & _memberAccess)
@@ -2766,6 +2772,8 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
27662772 )
27672773 annotation.isPure = *_memberAccess.expression ().annotation ().isPure ;
27682774 }
2775+ else
2776+ annotation.isLValue = false ;
27692777 }
27702778 else if (exprType->category () == Type::Category::Module)
27712779 {
@@ -3061,6 +3069,7 @@ vector<Declaration const*> TypeChecker::cleanOverloadedDeclarations(
30613069bool TypeChecker::visit (Identifier const & _identifier)
30623070{
30633071 IdentifierAnnotation& annotation = _identifier.annotation ();
3072+
30643073 if (!annotation.referencedDeclaration )
30653074 {
30663075 annotation.overloadedDeclarations = cleanOverloadedDeclarations (_identifier, annotation.candidateDeclarations );
0 commit comments