From b6ee2c2f5133e449ce40204cb5047cd2fa46d20d Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Fri, 3 Nov 2017 21:36:31 -0400 Subject: [PATCH] String token end location off-by-one error (#139) * String token end location off-by-one error --- main_test.go | 6 +++--- parser/lexer.go | 12 ++++-------- testdata/arrcomp_if6.golden | 2 +- testdata/bad_index_string.golden | 2 +- testdata/binaryNot2.golden | 2 +- testdata/bitwise_and4.golden | 4 ++-- testdata/bitwise_or10.golden | 2 +- testdata/bitwise_xor7.golden | 4 ++-- testdata/double_thunk.golden | 2 +- testdata/error.golden | 2 +- testdata/error_from_array.golden | 2 +- testdata/extvar_error.golden | 2 +- testdata/function_plus_string.golden | 2 +- testdata/import_computed.golden | 2 +- testdata/import_failure_directory.golden | 2 +- testdata/importstr_computed.golden | 2 +- testdata/insuper4.golden | 2 +- testdata/lazy_operator2.golden | 4 ++-- testdata/native4.golden | 2 +- testdata/nonexistent_import.golden | 2 +- testdata/nonexistent_import_crazy.golden | 2 +- testdata/number_divided_by_string.golden | 2 +- testdata/number_times_string.golden | 2 +- testdata/object_comp_err_elem.golden | 2 +- testdata/object_comp_err_index.golden | 2 +- testdata/object_invariant13.golden | 2 +- testdata/object_invariant7.golden | 6 +++--- testdata/or4.golden | 4 ++-- testdata/or5.golden | 2 +- testdata/or6.golden | 2 +- testdata/percent_bad.golden | 2 +- testdata/percent_bad3.golden | 2 +- testdata/recursive_thunk.golden | 2 +- testdata/std.filter2.golden | 2 +- testdata/std.primitiveEquals10.golden | 2 +- testdata/std.primitiveEquals9.golden | 2 +- testdata/std.toString5.golden | 2 +- testdata/string_divided_by_number.golden | 2 +- testdata/string_index_negative.golden | 2 +- testdata/string_index_out_of_bounds.golden | 2 +- testdata/string_minus_number.golden | 2 +- testdata/string_plus_function.golden | 2 +- testdata/string_times_number.golden | 2 +- testdata/tailstrict3.golden | 2 +- testdata/type_error.golden | 2 +- testdata/unary_minus4.golden | 2 +- 46 files changed, 57 insertions(+), 61 deletions(-) diff --git a/main_test.go b/main_test.go index 8d2ac89..301c5eb 100644 --- a/main_test.go +++ b/main_test.go @@ -205,11 +205,11 @@ func TestOneLineError(t *testing.T) { // TODO(sbarzowski) checking if the whitespace is right is quite unpleasant, what can we do about it? var minimalErrorTests = []errorFormattingTest{ {"error", `error "x"`, "RUNTIME ERROR: x\n" + - " error:1:1-9 $\n" + // TODO(sbarzowski) if seems we have off-by-one in location + " error:1:1-10 $\n" + // TODO(sbarzowski) if seems we have off-by-one in location " During evaluation \n" + ""}, {"error_in_func", `local x(n) = if n == 0 then error "x" else x(n - 1); x(3)`, "RUNTIME ERROR: x\n" + - " error_in_func:1:29-37 function \n" + + " error_in_func:1:29-38 function \n" + " error_in_func:1:44-52 function \n" + " error_in_func:1:44-52 function \n" + " error_in_func:1:44-52 function \n" + @@ -217,7 +217,7 @@ var minimalErrorTests = []errorFormattingTest{ " During evaluation \n" + ""}, {"error_in_error", `error (error "x")`, "RUNTIME ERROR: x\n" + - " error_in_error:1:8-16 $\n" + + " error_in_error:1:8-17 $\n" + " During evaluation \n" + ""}, } diff --git a/parser/lexer.go b/parser/lexer.go index 7897df8..687da94 100644 --- a/parser/lexer.go +++ b/parser/lexer.go @@ -711,15 +711,13 @@ func Lex(fn string, input string) (tokens, error) { // String literals case '"': stringStartLoc := l.prevLocation() - l.resetTokenStart() // Don't include the quotes in the token data for r = l.next(); ; r = l.next() { if r == lexEOF { return nil, l.makeStaticErrorPoint("Unterminated String", stringStartLoc) } if r == '"' { - l.backup() - l.emitToken(tokenStringDouble) - _ = l.next() + // Don't include the quotes in the token data + l.emitFullToken(tokenStringDouble, l.input[l.tokenStart+1:l.pos.byteNo-1], "", "") l.resetTokenStart() break } @@ -729,15 +727,13 @@ func Lex(fn string, input string) (tokens, error) { } case '\'': stringStartLoc := l.prevLocation() - l.resetTokenStart() // Don't include the quotes in the token data for r = l.next(); ; r = l.next() { if r == lexEOF { return nil, l.makeStaticErrorPoint("Unterminated String", stringStartLoc) } if r == '\'' { - l.backup() - l.emitToken(tokenStringSingle) - r = l.next() + // Don't include the quotes in the token data + l.emitFullToken(tokenStringSingle, l.input[l.tokenStart+1:l.pos.byteNo-1], "", "") l.resetTokenStart() break } diff --git a/testdata/arrcomp_if6.golden b/testdata/arrcomp_if6.golden index d278138..7d46b0a 100644 --- a/testdata/arrcomp_if6.golden +++ b/testdata/arrcomp_if6.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/arrcomp_if6:1:20-28 $ + testdata/arrcomp_if6:1:20-29 $ [x for x in [1] if error "x"] diff --git a/testdata/bad_index_string.golden b/testdata/bad_index_string.golden index 42c9890..ee74883 100644 --- a/testdata/bad_index_string.golden +++ b/testdata/bad_index_string.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/bad_index_string:1:2-13 $ + testdata/bad_index_string:1:1-13 $ "xxx"["xxx"] diff --git a/testdata/binaryNot2.golden b/testdata/binaryNot2.golden index 44d521b..e72f8d2 100644 --- a/testdata/binaryNot2.golden +++ b/testdata/binaryNot2.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/binaryNot2:1:1-6 $ + testdata/binaryNot2:1:1-7 $ ~"xxx" diff --git a/testdata/bitwise_and4.golden b/testdata/bitwise_and4.golden index 9bd1b50..3769d88 100644 --- a/testdata/bitwise_and4.golden +++ b/testdata/bitwise_and4.golden @@ -1,11 +1,11 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/bitwise_and4:1:5-13 $ + testdata/bitwise_and4:1:5-14 $ 1 & error "x" ------------------------------------------------- - testdata/bitwise_and4:1:1-13 $ + testdata/bitwise_and4:1:1-14 $ 1 & error "x" diff --git a/testdata/bitwise_or10.golden b/testdata/bitwise_or10.golden index 9fd2040..1696804 100644 --- a/testdata/bitwise_or10.golden +++ b/testdata/bitwise_or10.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/bitwise_or10:1:2-11 $ + testdata/bitwise_or10:1:1-11 $ "xxx" | 42 diff --git a/testdata/bitwise_xor7.golden b/testdata/bitwise_xor7.golden index 1970bcc..edcbd1a 100644 --- a/testdata/bitwise_xor7.golden +++ b/testdata/bitwise_xor7.golden @@ -1,11 +1,11 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/bitwise_xor7:1:5-13 $ + testdata/bitwise_xor7:1:5-14 $ 1 ^ error "x" ------------------------------------------------- - testdata/bitwise_xor7:1:1-13 $ + testdata/bitwise_xor7:1:1-14 $ 1 ^ error "x" diff --git a/testdata/double_thunk.golden b/testdata/double_thunk.golden index b585984..6251ac6 100644 --- a/testdata/double_thunk.golden +++ b/testdata/double_thunk.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/double_thunk:1:21-31 thunk from from <$>> + testdata/double_thunk:1:21-32 thunk from from <$>> local x = local y = error "xxx"; y; x diff --git a/testdata/error.golden b/testdata/error.golden index 9af9b18..a3e6e9d 100644 --- a/testdata/error.golden +++ b/testdata/error.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: 42 ------------------------------------------------- - testdata/error:1:1-10 $ + testdata/error:1:1-11 $ error "42" diff --git a/testdata/error_from_array.golden b/testdata/error_from_array.golden index b9babee..4937f52 100644 --- a/testdata/error_from_array.golden +++ b/testdata/error_from_array.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/error_from_array:1:2-12 thunk from <$> + testdata/error_from_array:1:2-13 thunk from <$> [error "xxx"][0] diff --git a/testdata/extvar_error.golden b/testdata/extvar_error.golden index 4b886ff..8963499 100644 --- a/testdata/extvar_error.golden +++ b/testdata/extvar_error.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - :1:1-11 $ + :1:1-12 $ error 'xxx' diff --git a/testdata/function_plus_string.golden b/testdata/function_plus_string.golden index b8331e8..c6b458d 100644 --- a/testdata/function_plus_string.golden +++ b/testdata/function_plus_string.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Couldn't manifest function in JSON output. ------------------------------------------------- - testdata/function_plus_string:1:1-23 $ + testdata/function_plus_string:1:1-24 $ (function() 42) + "xxx" diff --git a/testdata/import_computed.golden b/testdata/import_computed.golden index aa6258d..dc7660a 100644 --- a/testdata/import_computed.golden +++ b/testdata/import_computed.golden @@ -1,4 +1,4 @@ -testdata/import_computed:1:9-16 Computed imports are not allowed +testdata/import_computed:1:8-17 Computed imports are not allowed import "a" + "b" diff --git a/testdata/import_failure_directory.golden b/testdata/import_failure_directory.golden index 92fe73e..5f027c3 100644 --- a/testdata/import_failure_directory.golden +++ b/testdata/import_failure_directory.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: read testdata: is a directory ------------------------------------------------- - testdata/import_failure_directory:3:1-10 $ + testdata/import_failure_directory:3:1-11 $ import '.' diff --git a/testdata/importstr_computed.golden b/testdata/importstr_computed.golden index 5d6d57f..ded15b1 100644 --- a/testdata/importstr_computed.golden +++ b/testdata/importstr_computed.golden @@ -1,4 +1,4 @@ -testdata/importstr_computed:1:12-19 Computed imports are not allowed +testdata/importstr_computed:1:11-20 Computed imports are not allowed importstr "a" + "b" diff --git a/testdata/insuper4.golden b/testdata/insuper4.golden index 18e36ee..0ff102e 100644 --- a/testdata/insuper4.golden +++ b/testdata/insuper4.golden @@ -1,4 +1,4 @@ -testdata/insuper4:1:2-13 Can't use super outside of an object. +testdata/insuper4:1:1-13 Can't use super outside of an object. "x" in super diff --git a/testdata/lazy_operator2.golden b/testdata/lazy_operator2.golden index 0b0e66d..ccbf466 100644 --- a/testdata/lazy_operator2.golden +++ b/testdata/lazy_operator2.golden @@ -1,11 +1,11 @@ RUNTIME ERROR: should happen ------------------------------------------------- - testdata/lazy_operator2:1:9-29 $ + testdata/lazy_operator2:1:9-30 $ true && error "should happen" ------------------------------------------------- - testdata/lazy_operator2:1:1-29 $ + testdata/lazy_operator2:1:1-30 $ true && error "should happen" diff --git a/testdata/native4.golden b/testdata/native4.golden index f164203..4192e6e 100644 --- a/testdata/native4.golden +++ b/testdata/native4.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/native4:1:28-38 thunk from <$> + testdata/native4:1:28-39 thunk from <$> std.native("jsonToString")(error "xxx") diff --git a/testdata/nonexistent_import.golden b/testdata/nonexistent_import.golden index 92ac306..2352821 100644 --- a/testdata/nonexistent_import.golden +++ b/testdata/nonexistent_import.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Couldn't open import "no chance a file with this name exists": No match locally or in the Jsonnet library paths. ------------------------------------------------- - testdata/nonexistent_import:1:1-50 $ + testdata/nonexistent_import:1:1-51 $ importstr 'no chance a file with this name exists' diff --git a/testdata/nonexistent_import_crazy.golden b/testdata/nonexistent_import_crazy.golden index 1372de1..05ba464 100644 --- a/testdata/nonexistent_import_crazy.golden +++ b/testdata/nonexistent_import_crazy.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Couldn't open import "ąęółńśćźż \" ' \n\n\t\t": No match locally or in the Jsonnet library paths. ------------------------------------------------- - testdata/nonexistent_import_crazy:1:1-45 $ + testdata/nonexistent_import_crazy:1:1-46 $ importstr "ąęółńśćźż \" \' \n\n\t\t" diff --git a/testdata/number_divided_by_string.golden b/testdata/number_divided_by_string.golden index 7f8bc59..bfbba19 100644 --- a/testdata/number_divided_by_string.golden +++ b/testdata/number_divided_by_string.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/number_divided_by_string:1:1-10 $ + testdata/number_divided_by_string:1:1-11 $ 42 / "xxx" diff --git a/testdata/number_times_string.golden b/testdata/number_times_string.golden index 7a40603..5ca58d9 100644 --- a/testdata/number_times_string.golden +++ b/testdata/number_times_string.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/number_times_string:1:1-10 $ + testdata/number_times_string:1:1-11 $ 42 * "xxx" diff --git a/testdata/object_comp_err_elem.golden b/testdata/object_comp_err_elem.golden index 851ce00..764ac73 100644 --- a/testdata/object_comp_err_elem.golden +++ b/testdata/object_comp_err_elem.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/object_comp_err_elem:1:11-21 object + testdata/object_comp_err_elem:1:11-22 object { ["x"]: error "xxx" for x in [1] } diff --git a/testdata/object_comp_err_index.golden b/testdata/object_comp_err_index.golden index 2e600bc..5284e71 100644 --- a/testdata/object_comp_err_index.golden +++ b/testdata/object_comp_err_index.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/object_comp_err_index:1:4-14 $ + testdata/object_comp_err_index:1:4-15 $ { [error "xxx"]: 42 for x in [1] } diff --git a/testdata/object_invariant13.golden b/testdata/object_invariant13.golden index 2db479e..bf082ee 100644 --- a/testdata/object_invariant13.golden +++ b/testdata/object_invariant13.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/object_invariant13:1:10-18 object + testdata/object_invariant13:1:10-19 object { assert error "x" } diff --git a/testdata/object_invariant7.golden b/testdata/object_invariant7.golden index fed3aa0..76cbdb4 100644 --- a/testdata/object_invariant7.golden +++ b/testdata/object_invariant7.golden @@ -5,7 +5,7 @@ RUNTIME ERROR: Attempt to use super when there is no super class. { x: 5, assert super.x == 5 } ------------------------------------------------- - :969:29-30 thunk from from >> + :979:29-30 thunk from from >> local ta = std.type(a); @@ -13,7 +13,7 @@ RUNTIME ERROR: Attempt to use super when there is no super class. builtin function ------------------------------------------------- - :971:33-35 thunk from > + :981:33-35 thunk from > if !std.primitiveEquals(ta, tb) then @@ -21,7 +21,7 @@ RUNTIME ERROR: Attempt to use super when there is no super class. builtin function ------------------------------------------------- - :971:12-40 function + :981:12-40 function if !std.primitiveEquals(ta, tb) then diff --git a/testdata/or4.golden b/testdata/or4.golden index 0442042..fc4cd17 100644 --- a/testdata/or4.golden +++ b/testdata/or4.golden @@ -1,11 +1,11 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/or4:1:10-20 $ + testdata/or4:1:10-21 $ false || error "xxx" ------------------------------------------------- - testdata/or4:1:1-20 $ + testdata/or4:1:1-21 $ false || error "xxx" diff --git a/testdata/or5.golden b/testdata/or5.golden index 8483353..f66eded 100644 --- a/testdata/or5.golden +++ b/testdata/or5.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected boolean ------------------------------------------------- - testdata/or5:1:2-14 $ + testdata/or5:1:1-14 $ "xxx" || true diff --git a/testdata/or6.golden b/testdata/or6.golden index 56141dd..d662e6b 100644 --- a/testdata/or6.golden +++ b/testdata/or6.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected boolean ------------------------------------------------- - testdata/or6:1:1-14 $ + testdata/or6:1:1-15 $ false || "xxx" diff --git a/testdata/percent_bad.golden b/testdata/percent_bad.golden index 92888a0..cf182a4 100644 --- a/testdata/percent_bad.golden +++ b/testdata/percent_bad.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Operator % cannot be used on types number and string. ------------------------------------------------- - :150:13-99 function + :150:13-100 function error "Operator % cannot be used on types " + std.type(a) + " and " + std.type(b) + ".", diff --git a/testdata/percent_bad3.golden b/testdata/percent_bad3.golden index c757f79..a78351a 100644 --- a/testdata/percent_bad3.golden +++ b/testdata/percent_bad3.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Operator % cannot be used on types function and number. ------------------------------------------------- - :150:13-99 function + :150:13-100 function error "Operator % cannot be used on types " + std.type(a) + " and " + std.type(b) + ".", diff --git a/testdata/recursive_thunk.golden b/testdata/recursive_thunk.golden index 17b25c0..bd8ad77 100644 --- a/testdata/recursive_thunk.golden +++ b/testdata/recursive_thunk.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/recursive_thunk:1:35-45 function + testdata/recursive_thunk:1:35-46 function local bar(th, x) = if x == 0 then error "xxx" else th; diff --git a/testdata/std.filter2.golden b/testdata/std.filter2.golden index 14fc74d..f6b0766 100644 --- a/testdata/std.filter2.golden +++ b/testdata/std.filter2.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/std.filter2:1:12-20 thunk from <$> + testdata/std.filter2:1:12-21 thunk from <$> std.filter(error "x", []) diff --git a/testdata/std.primitiveEquals10.golden b/testdata/std.primitiveEquals10.golden index 15e15dc..485d04d 100644 --- a/testdata/std.primitiveEquals10.golden +++ b/testdata/std.primitiveEquals10.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/std.primitiveEquals10:1:21-29 thunk from <$> + testdata/std.primitiveEquals10:1:21-30 thunk from <$> std.primitiveEquals(error "x", 42) diff --git a/testdata/std.primitiveEquals9.golden b/testdata/std.primitiveEquals9.golden index f1278d0..ce0b563 100644 --- a/testdata/std.primitiveEquals9.golden +++ b/testdata/std.primitiveEquals9.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/std.primitiveEquals9:1:25-33 thunk from <$> + testdata/std.primitiveEquals9:1:25-34 thunk from <$> std.primitiveEquals(42, error "x") diff --git a/testdata/std.toString5.golden b/testdata/std.toString5.golden index 273457e..4d6c664 100644 --- a/testdata/std.toString5.golden +++ b/testdata/std.toString5.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: x ------------------------------------------------- - testdata/std.toString5:1:14-22 thunk from <$> + testdata/std.toString5:1:14-23 thunk from <$> std.toString(error "x") diff --git a/testdata/string_divided_by_number.golden b/testdata/string_divided_by_number.golden index 82246f8..a26162c 100644 --- a/testdata/string_divided_by_number.golden +++ b/testdata/string_divided_by_number.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/string_divided_by_number:1:2-11 $ + testdata/string_divided_by_number:1:1-11 $ "xxx" / 42 diff --git a/testdata/string_index_negative.golden b/testdata/string_index_negative.golden index eed3fcc..bd99cb2 100644 --- a/testdata/string_index_negative.golden +++ b/testdata/string_index_negative.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Index -1 out of bounds, not within [0, 4) ------------------------------------------------- - testdata/string_index_negative:1:2-11 $ + testdata/string_index_negative:1:1-11 $ "abcd"[-1] diff --git a/testdata/string_index_out_of_bounds.golden b/testdata/string_index_out_of_bounds.golden index 8f62929..2188ddc 100644 --- a/testdata/string_index_out_of_bounds.golden +++ b/testdata/string_index_out_of_bounds.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Index 4 out of bounds, not within [0, 4) ------------------------------------------------- - testdata/string_index_out_of_bounds:1:2-10 $ + testdata/string_index_out_of_bounds:1:1-10 $ "abcd"[4] diff --git a/testdata/string_minus_number.golden b/testdata/string_minus_number.golden index 2bd07c4..680c056 100644 --- a/testdata/string_minus_number.golden +++ b/testdata/string_minus_number.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/string_minus_number:1:2-9 $ + testdata/string_minus_number:1:1-9 $ "x" - 42 diff --git a/testdata/string_plus_function.golden b/testdata/string_plus_function.golden index ace2334..f4fa1ed 100644 --- a/testdata/string_plus_function.golden +++ b/testdata/string_plus_function.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Couldn't manifest function in JSON output. ------------------------------------------------- - testdata/string_plus_function:1:2-23 $ + testdata/string_plus_function:1:1-23 $ "xxx" + (function() 42) diff --git a/testdata/string_times_number.golden b/testdata/string_times_number.golden index 90f4fec..b363aa3 100644 --- a/testdata/string_times_number.golden +++ b/testdata/string_times_number.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/string_times_number:1:2-9 $ + testdata/string_times_number:1:1-9 $ "x" * 42 diff --git a/testdata/tailstrict3.golden b/testdata/tailstrict3.golden index 8d5630d..633431a 100644 --- a/testdata/tailstrict3.golden +++ b/testdata/tailstrict3.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/tailstrict3:1:16-26 function + testdata/tailstrict3:1:16-27 function local foo(x, y=error "xxx")=x; diff --git a/testdata/type_error.golden b/testdata/type_error.golden index 51dc5f7..8a19974 100644 --- a/testdata/type_error.golden +++ b/testdata/type_error.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: xxx ------------------------------------------------- - testdata/type_error:1:10-20 thunk from <$> + testdata/type_error:1:10-21 thunk from <$> std.type(error "xxx") diff --git a/testdata/unary_minus4.golden b/testdata/unary_minus4.golden index 0572598..82d0dd8 100644 --- a/testdata/unary_minus4.golden +++ b/testdata/unary_minus4.golden @@ -1,6 +1,6 @@ RUNTIME ERROR: Unexpected type string, expected number ------------------------------------------------- - testdata/unary_minus4:1:1-6 $ + testdata/unary_minus4:1:1-7 $ -"xxx"