Add required imports
This commit is contained in:
parent
9b4a23c4f2
commit
4c4004d3ac
@ -312,10 +312,6 @@ impl TypeContext {
|
||||
}
|
||||
*/
|
||||
fn infer(&mut self, expr: &Expression) -> TypeCheckResult {
|
||||
use self::ExpressionType::*;
|
||||
use self::Type::*;
|
||||
use self::TypeConst::*;
|
||||
|
||||
match (&expr.0, &expr.1) {
|
||||
(exprtype, &Some(ref anno)) => {
|
||||
let tx = self.infer_no_anno(exprtype)?;
|
||||
@ -327,6 +323,10 @@ impl TypeContext {
|
||||
}
|
||||
|
||||
fn infer_no_anno(&mut self, ex: &ExpressionType) -> TypeCheckResult {
|
||||
use self::ExpressionType::*;
|
||||
use self::Type::*;
|
||||
use self::TypeConst::*;
|
||||
|
||||
Ok(match ex {
|
||||
&IntLiteral(_) => TConst(Integer),
|
||||
&BoolLiteral(_) => TConst(Boolean),
|
||||
|
Loading…
Reference in New Issue
Block a user