Created
March 26, 2012 19:37
-
-
Save nikomatsakis/2209065 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl y for option<int> { | |
fn hi() { io::print("int"); } | |
} | |
impl x for option<uint> { | |
fn hi() { io::print("uint"); } | |
} | |
fn to_uint(x: option<uint>) {} | |
fn main() { | |
let x = none; | |
x.hi(); // unifies x with <int>... | |
to_uint(x); // ...thus failing here. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment