From 22b473872645c503f2d99a9b1ca71a568e720aac Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 12 Oct 2017 21:46:12 -0700 Subject: [PATCH] Add required imports --- src/schala_lang/type_check.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schala_lang/type_check.rs b/src/schala_lang/type_check.rs index f17b372..05352b6 100644 --- a/src/schala_lang/type_check.rs +++ b/src/schala_lang/type_check.rs @@ -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),