Skip to content

Error message regression when missing ) #348

Open
@LilithHafner

Description

@LilithHafner

I'm missing a ), but the new error message doesn't make that as clear as the old one.

Julia 1.0

julia> quote
           const $(esc(Symbol(name)) = 4
           export $(esc(Symbol(name))
       end
ERROR: syntax: missing comma or ) in argument list

Julia 1.10

julia> quote
           const $(esc(Symbol(name)) = 4
           export $(esc(Symbol(name))
       end
ERROR: ParseError:
# Error @ REPL[10]:2:5
quote
#   ┌────────────────────────────
    const $(esc(Symbol(name)) = 4
    export $(esc(Symbol(name))
#───────────────────────────┘ ── expected assignment after `const`
# Error @ REPL[10]:3:5
    const $(esc(Symbol(name)) = 4
    export $(esc(Symbol(name))
#   └──────────────────────┘ ── Expected `)`
# Error @ REPL[10]:3:30
    const $(esc(Symbol(name)) = 4
    export $(esc(Symbol(name))
#                            └ ── Expected `end`
# Error @ REPL[10]:3:30
    const $(esc(Symbol(name)) = 4
    export $(esc(Symbol(name))
#                            ╙ ── extra tokens after end of expression
# Error @ REPL[10]:4:1
    export $(esc(Symbol(name))
end
└─┘ ── invalid identifier
Stacktrace:
 [1] top-level scope
   @ none:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesBetter, more actionable diagnostics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions