diff options
| author | Graydon Hoare <[email protected]> | 2010-07-08 21:55:15 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-08 21:56:08 -0700 |
| commit | cbc31ea01ef28f60639e4752ee6413b17f038fbc (patch) | |
| tree | ae38975b8aa21dd1dddd49ab771c439d1c6eab0b /src/boot/me/resolve.ml | |
| parent | Err kindly instead of asserting on duplicate mod declarations in crates. (diff) | |
| download | rust-cbc31ea01ef28f60639e4752ee6413b17f038fbc.tar.xz rust-cbc31ea01ef28f60639e4752ee6413b17f038fbc.zip | |
Add detection for cyclic imports.
Diffstat (limited to 'src/boot/me/resolve.ml')
| -rw-r--r-- | src/boot/me/resolve.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml index 641df884..77fdbb3b 100644 --- a/src/boot/me/resolve.ml +++ b/src/boot/me/resolve.ml @@ -233,7 +233,7 @@ let lookup_type_node_by_name iflog cx (fun _ -> log cx "lookup_simple_type_by_name %a" Ast.sprintf_name name); - match lookup_by_name cx scopes name with + match lookup_by_name cx [] scopes name with None -> err None "unknown name: %a" Ast.sprintf_name name | Some (_, id) -> match htab_search cx.ctxt_all_defns id with @@ -390,7 +390,7 @@ and lookup_type_by_name iflog cx (fun _ -> log cx "+++ lookup_type_by_name %a" Ast.sprintf_name name); - match lookup_by_name cx scopes name with + match lookup_by_name cx [] scopes name with None -> err None "unknown name: %a" Ast.sprintf_name name | Some (scopes', id) -> let ty, params = @@ -746,7 +746,7 @@ let lval_base_resolving_visitor | _ -> false in if lval_is_name lv && lval_is_item cx lv - then ignore (lookup_by_name cx (!scopes) (lval_to_name lv)) + then ignore (lookup_by_name cx [] (!scopes) (lval_to_name lv)) in lookup_lval lv; |