From 20dd66f398077a149116dd84652908f92d8321b9 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 10 Jul 2020 21:06:09 +0100 Subject: [PATCH] Fix missing quote in error message for invalid Yul types --- libyul/AsmAnalysis.cpp | 2 +- test/libyul/yulSyntaxTests/invalid_type2.yul | 2 +- test/libyul/yulSyntaxTests/user_defined_functions_fail.yul | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libyul/AsmAnalysis.cpp b/libyul/AsmAnalysis.cpp index f0ac3c242..315699153 100644 --- a/libyul/AsmAnalysis.cpp +++ b/libyul/AsmAnalysis.cpp @@ -234,7 +234,7 @@ void AsmAnalyzer::operator()(VariableDeclaration const& _varDecl) m_errorReporter.typeError( 3947_error, variable.location, - "Assigning value of type \"" + givenType.str() + "\" to variable of type \"" + variable.type.str() + "." + "Assigning value of type \"" + givenType.str() + "\" to variable of type \"" + variable.type.str() + "\"." ); } } diff --git a/test/libyul/yulSyntaxTests/invalid_type2.yul b/test/libyul/yulSyntaxTests/invalid_type2.yul index 25320b055..2ad035dcf 100644 --- a/test/libyul/yulSyntaxTests/invalid_type2.yul +++ b/test/libyul/yulSyntaxTests/invalid_type2.yul @@ -5,4 +5,4 @@ // dialect: evmTyped // ---- // TypeError 5473: (15-28): "invalidType" is not a valid type (user defined types are not yet supported). -// TypeError 3947: (10-11): Assigning value of type "invalidType" to variable of type "u256. +// TypeError 3947: (10-11): Assigning value of type "invalidType" to variable of type "u256". diff --git a/test/libyul/yulSyntaxTests/user_defined_functions_fail.yul b/test/libyul/yulSyntaxTests/user_defined_functions_fail.yul index e81474613..7b8d012bb 100644 --- a/test/libyul/yulSyntaxTests/user_defined_functions_fail.yul +++ b/test/libyul/yulSyntaxTests/user_defined_functions_fail.yul @@ -8,5 +8,5 @@ // ==== // dialect: evmTyped // ---- -// TypeError 3947: (126-127): Assigning value of type "bool" to variable of type "u256. -// TypeError 3947: (129-136): Assigning value of type "u256" to variable of type "bool. +// TypeError 3947: (126-127): Assigning value of type "bool" to variable of type "u256". +// TypeError 3947: (129-136): Assigning value of type "u256" to variable of type "bool".