diff --git a/scripts/csv.py b/scripts/csv.py index 455cc945..4e5e4724 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -989,7 +989,11 @@ class RExpr: class IfElse(Expr): """b if a is non-zero, otherwise c""" def type(self, types={}): - return self.b.type(types) + t = self.b.type(types) + u = self.c.type(types) + if t != u: + raise RExpr.Error("mismatched types? %r" % self) + return t def fold(self, types={}): return self.b.fold(types)