Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error for missing commas in array #409

Open
inkydragon opened this issue Jan 23, 2024 · 0 comments
Open

Better error for missing commas in array #409

inkydragon opened this issue Jan 23, 2024 · 0 comments

Comments

@inkydragon
Copy link
Member

  1. The output of versioninfo()

    julia> versioninfo()
    Julia Version 1.10.0
    Commit 3120989f39b (2023-12-25 18:01 UTC)
    Build Info:
      Official https://julialang.org/ release
    Platform Info:
      OS: Linux (x86_64-linux-gnu)
      CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900HX
      WORD_SIZE: 64
      LIBM: libopenlibm
      LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
      Threads: 1 on 32 virtual cores
  2. How you installed Julia: juliaup

  3. MWE

[
    1.0, 2.0  
    # ......^ missing comma
    1e-6, 1e-8,
    rand(),
]

output

julia> [
           1.0, 2.0
           # ......^ missing comma
           1e-6, 1e-8,
           rand(),
       ]
ERROR: ParseError:
# Error @ REPL[135]:4:5
    # ......^ missing comma
#   ┌──────────
    1e-6, 1e-8,
    rand(),
#───────┘ ── Expected `]`
Stacktrace:
 [1] top-level scope
   @ none:1

Maybe add one more suggestion: "Maybe there is a missing comma in the array, please check"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant