From 2b36e40c58a4b153da593e4da73ba45647b811de Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 12 May 2011 10:51:13 +0200 Subject: Ensure ann tags are actually kept around during typechecking This way, the tag assigned by the parser stays with the node. I realize ann replacing is probably going away real soon, but I needed this now for moving the resolve defs out of the AST. --- src/comp/util/common.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/comp/util') diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index 5181cb45..83223d75 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -117,8 +117,8 @@ fn field_exprs(vec[ast.field] fields) -> vec [@ast.expr] { ret Vec.map[ast.field, @ast.expr](f, fields); } -fn plain_ann(middle.ty.ctxt tcx) -> ast.ann { - ret ast.ann_type(middle.ty.mk_nil(tcx), +fn plain_ann(&ast.ann old, middle.ty.ctxt tcx) -> ast.ann { + ret ast.ann_type(ast.ann_tag(old), middle.ty.mk_nil(tcx), none[vec[middle.ty.t]], none[@ts_ann]); } @@ -164,7 +164,7 @@ fn log_ann(&ast.ann a) -> () { case (ast.ann_none(_)) { log("ann_none"); } - case (ast.ann_type(_,_,_)) { + case (ast.ann_type(_,_,_,_)) { log("ann_type"); } } -- cgit v1.2.3