提交 a2a642c1 编写于 作者: G Graydon Hoare

Correct bug in typechecking ctor arguments to nonempty objects.

上级 ac270fc8
......@@ -217,7 +217,8 @@ fn ty_of_obj_ctor(@ty_item_table id_to_ty_item,
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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册