Merge remote-tracking branch 'origin/main' into remove-nat

This commit is contained in:
Richard Feldman 2024-02-11 12:26:36 -05:00
commit 24a38c4a26
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
99 changed files with 2636 additions and 938 deletions

View file

@ -739,14 +739,14 @@ fn type_problem_unary_operator() {
#[test]
fn type_problem_string_interpolation() {
expect_failure(
"\"This is not a string -> \\(1)\"",
"\"This is not a string -> $(1)\"",
indoc!(
r#"
TYPE MISMATCH
This argument to this string interpolation has an unexpected type:
4 "This is not a string -> \(1)"
4 "This is not a string -> $(1)"
^
The argument is a number of type:
@ -1542,7 +1542,7 @@ fn interpolation_with_nested_interpolation() {
expect_failure(
indoc!(
r#"
"foo $(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")"
"foo $(Str.joinWith ["a$(Num.toStr 5)", "b"] "c")"
"#
),
indoc!(
@ -1551,7 +1551,7 @@ fn interpolation_with_nested_interpolation() {
This string interpolation is invalid:
4 "foo $(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")"
4 "foo $(Str.joinWith ["a$(Num.toStr 5)", "b"] "c")"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
String interpolations cannot contain newlines or other interpolations.