Display string literal as hex in error messages if it is not printable ASCII

This commit is contained in:
Alex Beregszaszi
2020-09-23 17:33:39 +01:00
parent 0e5abbd4a9
commit a154594de6
12 changed files with 30 additions and 17 deletions
@@ -2,4 +2,4 @@ contract C {
string s = hex"a000";
}
// ----
// TypeError 7407: (28-37): Type literal_string (contains invalid UTF-8 sequence at position 0) is not implicitly convertible to expected type string storage ref.
// TypeError 7407: (28-37): Type literal_string hex"a000" (contains invalid UTF-8 sequence at position 0) is not implicitly convertible to expected type string storage ref.