Skip to content

improve error message for new missing type parameters. #431

@oscardssmith

Description

@oscardssmith

Currently the following code

struct A{T}
    t::T
    function A(t)
        new(t)
    end
end

produces the syntax error

ERROR: syntax: too few type parameters specified in "new{...}" around REPL[3]:1
Stacktrace:
[1] top-level scope
  @ REPL[3]:1

This isn't a bad error message; it correctly identifies new missing type parameters, but it's missing the nice JuliaSyntax highlighting, and doesn't say how many parameters were expected (not needed in this example, but for types with lots of params, it would be useful).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions