String and () types

This commit is contained in:
greg 2017-10-10 21:51:45 -07:00
parent b4208b696d
commit d735e45688
1 changed files with 8 additions and 1 deletions

View File

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