Add operators, math, time, string, collection, and HOF builtins to El
This commit is contained in:
@@ -493,6 +493,10 @@ impl TypeChecker {
|
||||
Expr::Reason { .. } => Type::String,
|
||||
Expr::Parallel { .. } => Type::Unknown,
|
||||
Expr::Trace { .. } => Type::Unknown,
|
||||
Expr::UnaryBitNot(inner) => {
|
||||
self.infer_expr(inner);
|
||||
Type::Int
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,6 +553,8 @@ impl TypeChecker {
|
||||
}
|
||||
Type::Bool
|
||||
}
|
||||
BinOp::Mod | BinOp::BitAnd | BinOp::BitOr | BinOp::BitXor
|
||||
| BinOp::Shl | BinOp::Shr => Type::Int,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user