Skip to content

JuliaSyntax does not reject broadcasted getindex #60270

@Keno

Description

@Keno
$ JULIA_USE_FLISP_PARSER=1 julia -q
julia> [1,2].[(1, 2)]
ERROR: syntax: invalid syntax "[1, 2].[(1, 2)]" around REPL[1]:1
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1
$ julia -q
julia> [1,2].[(1, 2)]
ERROR: MethodError: no method matching getproperty(::Vector{Int64}, ::Expr)
The definition in Core may have intended to extend (Base).getproperty
The function `getproperty` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  getproperty(::Any, ::Symbol, ::Symbol)
   @ Base Base_compiler.jl:81
  getproperty(::Any, ::Symbol)
   @ Base Base_compiler.jl:57
  getproperty(::Base.Filesystem.DirEntry, ::Symbol)
   @ Base file.jl:1060
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions