Created
March 21, 2012 14:28
-
-
Save nikomatsakis/2147394 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
enum t { | |
ty_nil, | |
} | |
fn mk_nil<C:ty_ops>(cx: C) -> t { | |
cx.mk() | |
} | |
iface ty_ops { | |
fn mk() -> t; | |
} | |
impl of ty_ops for () { | |
fn mk() -> t { | |
ty_nil | |
} | |
} | |
fn main() { | |
let fn_env = fn@() { | |
mk_nil(()); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment