Handle tuple literals in type system

This commit is contained in:
greg 2018-03-03 11:55:20 -08:00
parent 695e733584
commit 276dad56d7

View File

@ -224,8 +224,14 @@ impl TypeContext {
}
Ok(tf)
},
&TupleLiteral(ref expressions) => {
let mut types = vec![];
for expr in expressions {
types.push(self.infer(expr)?);
}
Ok(Sum(types))
},
/*
TupleLiteral(Vec<Expression>),
Index {
indexee: Box<Expression>,
indexers: Vec<Expression>,