summary refs log tree commit diff
path: root/src/test/run-pass/module-polymorphism4-files/cat.rs
blob: f19b72ed18176fa5775f63c7a8f7ed08c87695fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
type T = cat;

enum cat {
    howlycat,
    meowlycat
}

fn animal() -> ~str { ~"cat" }
fn talk(c: cat) -> ~str {
    match c {
      howlycat =>  { ~"howl" }
      meowlycat => { ~"meow" }
    }
}