Skip to content

re-unify Type::try_call_constructor and Type::bindings #2124

@carljm

Description

@carljm

We currently do some extensive special-casing in TypeInferenceBuilder::infer_call_expression_impl, much of which dates back to working around limitations we no longer have, and can/should now be removed. Part of this special-casing is a dedicated path for constructor calls (Type::try_call_constructor), which doesn't use the bindings that would be returned by Type::bindings for the same type -- so it's not consistent with what happens if you use Type::try_call. This leads to bugs like #1446

Metadata

Metadata

Assignees

No one assigned

    Labels

    callsIssues relating to call-signature checking and diagnostics

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions