Fix expressions with paths with more than one element.
This commit is contained in:
parent
8122e0c542
commit
ff6864aa5c
@ -432,8 +432,7 @@ fn fold_expr_path(&env e, &span sp, &ast.path p, &option.t[def] d,
|
||||
path_len = n_idents - remaining + 1u;
|
||||
}
|
||||
case (def_wrap_other(_)) {
|
||||
check (n_idents == 1u);
|
||||
path_len = 1u;
|
||||
path_len = n_idents;
|
||||
}
|
||||
case (def_wrap_mod(?m)) {
|
||||
e.sess.span_err(sp,
|
||||
|
8
src/test/run-pass/path.rs
Normal file
8
src/test/run-pass/path.rs
Normal file
@ -0,0 +1,8 @@
|
||||
mod foo {
|
||||
fn bar(uint offset) {
|
||||
}
|
||||
}
|
||||
|
||||
fn main(vec[str] args) {
|
||||
foo.bar(0u);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user