2012-07-11 12:28:30 -05:00
|
|
|
type clam = { chowder: &int };
|
2012-04-01 16:28:30 -05:00
|
|
|
|
2012-07-11 17:00:40 -05:00
|
|
|
trait get_chowder {
|
|
|
|
fn get_chowder() -> &self/int;
|
|
|
|
}
|
|
|
|
|
2012-08-07 20:10:06 -05:00
|
|
|
impl clam: get_chowder {
|
2012-08-01 19:30:05 -05:00
|
|
|
fn get_chowder() -> &self/int { return self.chowder; }
|
2012-03-15 20:13:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let clam = { chowder: &3 };
|
|
|
|
log(debug, *clam.get_chowder());
|
2012-03-23 13:37:10 -05:00
|
|
|
clam.get_chowder();
|
2012-03-15 20:13:12 -05:00
|
|
|
}
|
|
|
|
|