Skip to content

transactional facilities are not implemented for ty_ivar #2933

@nikomatsakis

Description

@nikomatsakis

The infer module has transactional capabilities for rolling back changes to type/region variables, but these are not being used for integral type variables. We have to modify the methods commit(), try(), and probe() to do something comparable to what is being done for the tvb variable.

Here is a test that displays undesirable behavior as a result:

impl methods for uint {
    fn foo() -> ~str { ~"uint" }
}
impl methods for int {
    fn foo() -> ~str { ~"int" }
}
fn main() {
    assert 22.foo() == ~"int";
}

Actually a naive fix for this will probably lead to an ambig method call error. I am not sure if this is the right thing or not.

Metadata

Metadata

Assignees

Labels

A-type-systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions