mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Revise nested interpolation error message
This commit is contained in:
parent
9c9a7884f2
commit
071138dd9f
2 changed files with 2 additions and 3 deletions
|
@ -1376,8 +1376,7 @@ fn interpolation_with_nested_interpolation() {
|
||||||
4│ "foo \(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")"
|
4│ "foo \(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")"
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
String interpolation cannot contain newlines, comments, or nested
|
String interpolations cannot contain newlines or other interpolations.
|
||||||
interpolations.
|
|
||||||
|
|
||||||
You can learn more about string interpolation at
|
You can learn more about string interpolation at
|
||||||
<https://www.roc-lang.org/tutorial#string-interpolation>
|
<https://www.roc-lang.org/tutorial#string-interpolation>
|
||||||
|
|
|
@ -557,7 +557,7 @@ pub fn can_problem<'b>(
|
||||||
doc = alloc.stack([
|
doc = alloc.stack([
|
||||||
alloc.reflow("This string interpolation is invalid:"),
|
alloc.reflow("This string interpolation is invalid:"),
|
||||||
alloc.region(lines.convert_region(region)),
|
alloc.region(lines.convert_region(region)),
|
||||||
alloc.reflow(r"String interpolation cannot contain newlines, comments, or nested interpolations."),
|
alloc.reflow(r"String interpolations cannot contain newlines or other interpolations."),
|
||||||
alloc.reflow(r"You can learn more about string interpolation at <https://www.roc-lang.org/tutorial#string-interpolation>"),
|
alloc.reflow(r"You can learn more about string interpolation at <https://www.roc-lang.org/tutorial#string-interpolation>"),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue