-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
This is more a difference than a bug, but definitely breaking:
1.2:
julia> var = 3
3
julia> println("Hello from var $var.")
Hello from var 3.1.3-rc1:
julia> var = 3
3
julia> println("Hello from var $var.")
ERROR: syntax: unexpected ")"
Stacktrace:
[1] top-level scope at REPL[1]:0From HISTORY.md:
Non-parenthesized interpolated variables in strings, e.g. "$x", must be followed by a character that will never be an allowed identifier character (currently operators, space/control characters, or common punctuation characters) (#25231).
So this was sort of warned but not erroring before 1.3
Edit
Going even deeper, the error does not happen with 1-char variable identifiers:
julia> x = 1
1
julia> "$x."
"1."
julia> println("$x.")
1.blegatodow
Metadata
Metadata
Assignees
Labels
No labels