Skip to content

Error message are bad on type error #770

@irevoire

Description

@irevoire

While playing a bit with the type system I realized that our error messages are pretty bad.
We don't even point to any specific location. Here's an example:

fn truc<A: Dim>(a: A) = 12
truc("hello")

Returns:

error: Could not solve the following constraints:
  String: DType
.. while trying to infer types in the (elaborated) statement:
  truc("hello")

 = Consider adding type annotations to get more precise error messages.

Interpreter stopped

From what I see we're able to retrieve the truc("hello") so we should at least be able to point to that location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions