imported patch jason/slicc-external-structure-fix
This commit is contained in:
parent
86d6b788f6
commit
884cd6f752
|
@ -45,7 +45,7 @@ class AssignStatementAST(StatementAST):
|
||||||
|
|
||||||
code("$lcode = $rcode;")
|
code("$lcode = $rcode;")
|
||||||
|
|
||||||
if ltype != rtype:
|
if not (ltype == rtype or (ltype.isInterface and ltype['interface'] == rtype.ident)):
|
||||||
# FIXME - beckmann
|
# FIXME - beckmann
|
||||||
# the following if statement is a hack to allow NetDest
|
# the following if statement is a hack to allow NetDest
|
||||||
# objects to be assigned to Sets this allows for the
|
# objects to be assigned to Sets this allows for the
|
||||||
|
|
|
@ -93,7 +93,7 @@ class FuncCallExprAST(ExprAST):
|
||||||
for expr,expected_type in zip(self.exprs, func.param_types):
|
for expr,expected_type in zip(self.exprs, func.param_types):
|
||||||
# Check the types of the parameter
|
# Check the types of the parameter
|
||||||
actual_type,param_code = expr.inline(True)
|
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" % \
|
expr.error("Type mismatch: expected: %s actual: %s" % \
|
||||||
(expected_type, actual_type))
|
(expected_type, actual_type))
|
||||||
cvec.append(param_code)
|
cvec.append(param_code)
|
||||||
|
|
Loading…
Reference in a new issue