String and () types
This commit is contained in:
parent
f82c6199c0
commit
cd11d18385
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user