From 884cd6f7526e35fe900413eb5f5c07c04fc2b7e3 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Tue, 10 Jul 2012 22:51:54 -0700 Subject: [PATCH] imported patch jason/slicc-external-structure-fix --- src/mem/slicc/ast/AssignStatementAST.py | 2 +- src/mem/slicc/ast/FuncCallExprAST.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mem/slicc/ast/AssignStatementAST.py b/src/mem/slicc/ast/AssignStatementAST.py index 3c3426f5b..042204925 100644 --- a/src/mem/slicc/ast/AssignStatementAST.py +++ b/src/mem/slicc/ast/AssignStatementAST.py @@ -45,7 +45,7 @@ class AssignStatementAST(StatementAST): code("$lcode = $rcode;") - if ltype != rtype: + if not (ltype == rtype or (ltype.isInterface and ltype['interface'] == rtype.ident)): # FIXME - beckmann # the following if statement is a hack to allow NetDest # objects to be assigned to Sets this allows for the diff --git a/src/mem/slicc/ast/FuncCallExprAST.py b/src/mem/slicc/ast/FuncCallExprAST.py index 75ec12344..3747d0dfd 100644 --- a/src/mem/slicc/ast/FuncCallExprAST.py +++ b/src/mem/slicc/ast/FuncCallExprAST.py @@ -93,7 +93,7 @@ class FuncCallExprAST(ExprAST): for expr,expected_type in zip(self.exprs, func.param_types): # Check the types of the parameter actual_type,param_code = expr.inline(True) - if actual_type != expected_type: + if str(actual_type) != str(expected_type): expr.error("Type mismatch: expected: %s actual: %s" % \ (expected_type, actual_type)) cvec.append(param_code)