Skip to content

Emphasize mismatching part of complex type mismatches #4578

@sbergen

Description

@sbergen

When a type mismatch is complex, and some types are unbound (is this the correct term?), it can be hard to see where the error actually is. Here is a concrete example I actually wasted quite a bit of time on:

Expected type:

    drift.Step(List(String), Input, Output, Nil)

Found type:

    drift.Step(List(string), Input, a, b)

It could be made clearer by emphasizing where the type mismatch was exactly:

Expected type:

    drift.Step(List(String), Input, Output, Nil)
                    ^^^^^^

Found type:

    drift.Step(List(string), Input, a, b)
                    ^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe approach has not yet been decidedhelp wantedContributions encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions