Handle tuple literals in type system
This commit is contained in:
parent
08e10739e5
commit
a7672171a6
@ -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>,
|
||||
|
Loading…
Reference in New Issue
Block a user