diff src/ast_type.rs @ 3:326d7f2a94d4

Remove useless abstraction of function name as Expr.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 31 May 2016 02:36:24 +0100
parents 5fc7c2790d8c
children f27a4aee9dfa
line wrap: on
line diff
--- a/src/ast_type.rs
+++ b/src/ast_type.rs
@@ -44,7 +44,7 @@ impl Visitor<Type> for Typing {
             Statement::ClassDef(name, classes, body) => {
                 Type::Bottom
             },
-            Statement::FunctionDef(Expr::Name(name), arguments, body) => {
+            Statement::FunctionDef(name, arguments, body) => {
                 let mut env = self.environment.pop().unwrap();
                 self.environment.push(env.clone());
 
@@ -71,10 +71,6 @@ impl Visitor<Type> for Typing {
                 }
                 Type::Bottom
             },
-            Statement::FunctionDef(_, _, _) => {
-                println!("Statement:FunctionDef Error");
-                panic!()
-            },
             Statement::Global(_) => {
                 Type::Bottom
             },