Skip to content

integral variable bindings do not "rollback" like they should #3211

Closed
@nikomatsakis

Description

@nikomatsakis

The type inference module includes a "transactional" component that allows unifications to roll back in the case of failure. This is used in various places but one notable place is in the resolution of impls, where we must look for all possible matches. However, integral type variables never roll back. This is simple to fix but it exposes another problem, which is that we are not properly forcing integral type variables to int in method calls. As a side effect, something like this:

5.times { }

yields an error because here 5 could be int, uint, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions