Don't unify the *input* to init-box with a box constraint, nurr.

This commit is contained in:
Graydon Hoare 2010-07-02 12:33:51 -07:00
parent 0efce5ebe2
commit f955d06ca9

View file

@ -1275,9 +1275,10 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
unify_lval rval_ctx lval (ty Ast.TY_task);
| Ast.STMT_init_box (dst, v) ->
let tv = ref (TYSPEC_mutable (ref (TYSPEC_box (any())))) in
let in_tv = any() in
let tv = ref (TYSPEC_mutable (ref (TYSPEC_box in_tv))) in
unify_lval strict_ctx dst tv;
unify_atom rval_ctx v tv;
unify_atom rval_ctx v in_tv;
(* FIXME (issue #52): Finish these. *)
(* Fake-typecheck a few comm-related statements for now, just enough