diff --git a/libyul/AsmParser.h b/libyul/AsmParser.h index 229c2ef44..da4f09ed2 100644 --- a/libyul/AsmParser.h +++ b/libyul/AsmParser.h @@ -97,9 +97,10 @@ public: protected: langutil::SourceLocation currentLocation() const override { - if (m_useSourceLocationFrom == UseSourceLocationFrom::Scanner) - return ParserBase::currentLocation(); - return m_locationOverride; + if (m_useSourceLocationFrom == UseSourceLocationFrom::LocationOverride) + return m_locationOverride; + + return ParserBase::currentLocation(); } langutil::Token advance() override; diff --git a/test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed_with_debug_info.yul b/test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed_with_debug_info.yul index f27be64f5..79ba4f83d 100644 --- a/test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed_with_debug_info.yul +++ b/test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed_with_debug_info.yul @@ -5,5 +5,5 @@ object "C" { } } // ---- -// ParserError 6913: Call or assignment expected. +// ParserError 6913: (65-66): Call or assignment expected. // ParserError 2314: (67-68): Expected end of source but got '}'