rust/src/test/run-pass/export-unexported-dep.rs
2012-08-01 19:16:06 -07:00

17 lines
319 B
Rust

// This tests that exports can have visible dependencies on things
// that are not exported, allowing for a sort of poor-man's ADT
mod foo {
export f;
export g;
// not exported
enum t { t1, t2, }
fn f() -> t { return t1; }
fn g(v: t) { assert (v == t1); }
}
fn main() { foo::g(foo::f()); }