Skip to content

error 282: If we have no info about the actual type param, say something about the formal type param #36554

Closed
@nrc

Description

@nrc

e.g.,

unable to infer enough type information about `_`

and inline:

cannot infer type for `_`

This is when calling a function with a generic type parameter. The actual type parameter is inferred, so we can't name it, but there is a corresponding formal parameter we could name.

E.g., if calling foo<T>(...) we have foo(...) and so get a type error for _, but we could mention T here, something like

cannot infer type for `_`, the inferred type corresponding to `T` in this call to `foo`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions