From efadf7e41f73b83f3a7793562cc26f3e92b0211d Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 26 May 2017 20:42:17 +0100 Subject: Change error message for invalid type --- libsolidity/inlineasm/AsmAnalysis.cpp | 2 +- test/libjulia/Parser.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index eb6f8bc0..24eddf05 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -463,7 +463,7 @@ void AsmAnalyzer::expectValidType(string const& type, SourceLocation const& _loc if (!(set{"bool", "u8", "s8", "u32", "s32", "u64", "s64", "u128", "s128", "u256", "s256"}).count(type)) m_errors.push_back(make_shared( Error::Type::TypeError, - "User defined types (\"" + type + "\") are not supported yet.", + "\"" + type + "\" is not a valid type (user defined types are not yet supported).", _location )); } diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp index c35c9e46..b82c446a 100644 --- a/test/libjulia/Parser.cpp +++ b/test/libjulia/Parser.cpp @@ -200,10 +200,10 @@ BOOST_AUTO_TEST_CASE(invalid_types) { /// testing invalid literal /// NOTE: these will need to change when types are compared - CHECK_ERROR("{ let x:bool := 1:invalid }", TypeError, "User defined types (\"invalid\") are not supported yet."); + CHECK_ERROR("{ let x:bool := 1:invalid }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); /// testing invalid variable declaration - CHECK_ERROR("{ let x:invalid := 1:bool }", TypeError, "User defined types (\"invalid\") are not supported yet."); - CHECK_ERROR("{ function f(a:invalid) {} }", TypeError, "User defined types (\"invalid\") are not supported yet."); + CHECK_ERROR("{ let x:invalid := 1:bool }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); + CHECK_ERROR("{ function f(a:invalid) {} }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); } BOOST_AUTO_TEST_CASE(builtin_types) -- cgit v1.2.3