Handle tuple literals in type system

This commit is contained in:
greg 2018-03-03 11:55:20 -08:00
parent 08e10739e5
commit a7672171a6
1 changed files with 7 additions and 1 deletions

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>,