Created
October 13, 2012 19:00
-
-
Save am0d/3885764 to your computer and use it in GitHub Desktop.
Sample showing llvm crash
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
extern mod std; | |
struct Tree { | |
mut leftTree: @Option<Tree>, | |
mut rightTree: @Option<Tree>, | |
key: int | |
} | |
impl Tree { | |
fn insert(i: int) { | |
if i > self.key { | |
match copy *self.rightTree { | |
Some(t) => t.insert(i), | |
None => self.rightTree = @Some(Tree {leftTree: @None, rightTree: @None, key: i}) | |
} | |
} | |
} | |
} | |
fn main () { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment