-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Description
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 systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.