Handle tuple literals in type system
This commit is contained in:
parent
695e733584
commit
276dad56d7
@ -224,8 +224,14 @@ impl TypeContext {
|
|||||||
}
|
}
|
||||||
Ok(tf)
|
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 {
|
Index {
|
||||||
indexee: Box<Expression>,
|
indexee: Box<Expression>,
|
||||||
indexers: Vec<Expression>,
|
indexers: Vec<Expression>,
|
||||||
|
Loading…
Reference in New Issue
Block a user