Skip to content

bad type signature (with splat) could have a more clear error message #58319

Open
@adienes

Description

@adienes

in my opinion this would be better as a syntax error than an internal error

julia> bar(t::Tuple{X...}) where X = t
ERROR: MethodError: no method matching iterate(::TypeVar)
The function `iterate` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  iterate(::LazyString)
   @ Base strings/lazy.jl:94
  iterate(::LazyString, ::Integer)
   @ Base strings/lazy.jl:95
  iterate(::CompositeException, Any...)
   @ Base task.jl:55

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesBetter, more actionable error messagesparserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions