diff options
| author | Graydon Hoare <[email protected]> | 2010-07-23 13:51:56 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-23 13:51:56 -0700 |
| commit | 62b69503d5bc458c928f44bf38ce5ccf25bf4fe4 (patch) | |
| tree | e71c90d763b20fc28799d0922ccc34d37ce7bb70 /src/boot/me/semant.ml | |
| parent | Widen write mutability check to cover all writing stmts. (diff) | |
| download | rust-62b69503d5bc458c928f44bf38ce5ccf25bf4fe4.tar.xz rust-62b69503d5bc458c928f44bf38ce5ccf25bf4fe4.zip | |
Stop using project_lval_ty_from_slot for lval_ty; cover residual un-caught cases in type.ml.
Diffstat (limited to 'src/boot/me/semant.ml')
| -rw-r--r-- | src/boot/me/semant.ml | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index ef73753d..8196d568 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -1206,18 +1206,10 @@ let rec project_lval_ty_from_slot (cx:ctxt) (lval:Ast.lval) : Ast.ty = let lval_ty (cx:ctxt) (lval:Ast.lval) : Ast.ty = - (* - FIXME: The correct definition of this function is just: - - Hashtbl.find cx.ctxt_all_lval_types (lval_base_id lval) - - However, since the typechecker is not presently handling - every stmt, we have a fallback mode to "pick out the slot - type and hope for the best". - *) match htab_search cx.ctxt_all_lval_types (lval_base_id lval) with Some t -> t - | None -> project_lval_ty_from_slot cx lval + | None -> bugi cx (lval_base_id lval) "no type for lval %a" + Ast.sprintf_lval lval ;; let lval_is_static (cx:ctxt) (lval:Ast.lval) : bool = |