PS K:\uc24> julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.5 (2025-04-14)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> let x = 1
x
end
1
julia> let x = 1 #
ERROR: ParseError:
# Error @ REPL[2]:1:10
let x = 1 #
# └ ── premature end of input
Stacktrace:
[1] top-level scope
@ none:1
Definitely a REPL limitation, like how we get a ParseError in strings or code if we input too many newlines even though that’d be fine if include-d from a file. Couple weird workarounds:
julia> let x = 1 # wrote this comment after the next line
x
end
1
julia> let x = 1; # wrote this comment immediately
x
end
1
Like most users, I have no idea. You might see where the developers are at if you open a Github issue about this. If it’ll help, this particular REPL limitation seems to have started in v1.10 when JuliaSyntax.jl replaced the femtolisp-based parser; you can confirm by comparing v1.9 and v1.10.