提交 764de078 编写于 作者: B Brian Anderson

Add a regression test that exports can expose unexported items

While those unexported items can't be used by name outside the module in which
they are defined, they can be used as a sort of ADT.
上级 9d21cf3b
// 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
tag t {
t1;
}
fn f() -> t {
ret t1;
}
fn g(t v) {
assert v == t1;
}
}
fn main() {
foo.g(foo.f());
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册