}
}
+fn visit_ty_opt[E](&option::t[@ty] ot, &E e, &vt[E] v) {
+ alt (ot) {
+ case (none) {}
+ case (some(?t)) { v.visit_ty(t, e, v); }
+ }
+}
+
fn visit_constr[E](&@constr c, &E e, &vt[E] v) {
// default
case (expr_log(_, ?x)) { v.visit_expr(x, e, v); }
case (expr_check(_, ?x)) { v.visit_expr(x, e, v); }
case (expr_assert(?x)) { v.visit_expr(x, e, v); }
- case (expr_port(_)) { }
+ case (expr_port(?t)) { visit_ty_opt(t, e, v); }
case (expr_chan(?x)) { v.visit_expr(x, e, v); }
case (expr_anon_obj(?anon_obj, _)) {
alt (anon_obj.fields) {
--- /dev/null
+// xfail-stage0
+// error-pattern:meep
+fn echo[T](chan[T] c, chan[chan[T]] oc) {
+ // Tests that the type argument in port gets
+ // visited
+ auto p = port[T]();
+ oc <| chan(p);
+
+ auto x;
+ p |> x;
+ c <| x;
+}
+
+fn main() {
+ fail "meep";
+}
\ No newline at end of file