2011-05-02 19:42:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
// 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 {
|
2011-05-02 19:42:00 -04:00
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
// not exported
|
|
|
|
tag t { t1; }
|
|
|
|
fn f() -> t { ret t1; }
|
|
|
|
fn g(t v) { assert (v == t1); }
|
2011-05-02 19:42:00 -04:00
|
|
|
}
|
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
fn main() { foo::g(foo::f()); }
|