AssignStatementAST.py (9106:aa9b75db7ea0) AssignStatementAST.py (10895:287285860dd6)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42
43 ltype = self.lvalue.generate(lcode)
44 rtype = self.rvalue.generate(rcode)
45
46 code("$lcode = $rcode;")
47
48 if not (ltype == rtype or (ltype.isInterface and ltype['interface'] == rtype.ident)):
49 # FIXME - beckmann
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42
43 ltype = self.lvalue.generate(lcode)
44 rtype = self.rvalue.generate(rcode)
45
46 code("$lcode = $rcode;")
47
48 if not (ltype == rtype or (ltype.isInterface and ltype['interface'] == rtype.ident)):
49 # FIXME - beckmann
50 # the following if statement is a hack to allow NetDest
51 # objects to be assigned to Sets this allows for the
52 # previous NetworkMessage Destiantion 'Set class' to
53 # migrate to the new NetworkMessage Destiantion 'NetDest
54 # class'
50 # the following if statement is a hack to allow NetDest objects to
51 # be assigned to Sets this allows for the previous Message
52 # Destination 'Set class' to migrate to the new Message Destination
53 # 'NetDest class'
55 if str(ltype) != "NetDest" and str(rtype) != "Set":
56 self.error("Assignment type mismatch '%s' and '%s'",
57 ltype, rtype)
54 if str(ltype) != "NetDest" and str(rtype) != "Set":
55 self.error("Assignment type mismatch '%s' and '%s'",
56 ltype, rtype)