diff options
| author | Graydon Hoare <[email protected]> | 2010-12-22 13:57:18 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-22 13:57:18 -0800 |
| commit | a2a642c17a1f7936728511de84f1dd65cc69d212 (patch) | |
| tree | 4bdcbb57302454da939ae5d48974c5f99781916c | |
| parent | Allocate heap cells to store non-empty object bodies. (diff) | |
| download | rust-a2a642c17a1f7936728511de84f1dd65cc69d212.tar.xz rust-a2a642c17a1f7936728511de84f1dd65cc69d212.zip | |
Correct bug in typechecking ctor arguments to nonempty objects.
| -rw-r--r-- | src/comp/middle/typeck.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index f3276090..c4fd7d7f 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -217,7 +217,8 @@ fn collect_item_types(@ast.crate crate) -> tup(@ast.crate, @ty_table) { auto t_obj = ty_of_obj(id_to_ty_item, item_to_ty, obj_info); let vec[arg] t_inputs = vec(); for (ast.obj_field f in obj_info.fields) { - auto t_field = getter(id_to_ty_item, item_to_ty, f.id); + auto g = bind getter(id_to_ty_item, item_to_ty, _); + auto t_field = ast_ty_to_ty(g, f.ty); append[arg](t_inputs, rec(mode=ast.alias, ty=t_field)); } auto t_fn = plain_ty(ty.ty_fn(t_inputs, t_obj)); |