String and () types

This commit is contained in:
greg 2017-10-10 21:51:45 -07:00
parent f82c6199c0
commit cd11d18385

View File

@ -152,10 +152,17 @@ impl TypeContext {
match name.as_ref().as_ref() {
"Int" => TConst(Integer),
"Bool" => TConst(Boolean),
"String" => TConst(StringT),
_ => self.get_existential_type()
}
},
_ => TConst(Bottom)
&TypeName::Tuple(ref items) => {
if items.len() == 1 {
TConst(Unit)
} else {
TConst(Bottom)
}
}
}
}