Commit 4ccacde4 authored by Stefan Behnel's avatar Stefan Behnel

added safety assertion to prevent utility code from overwriting that of other...

added safety assertion to prevent utility code from overwriting that of other entries with the same name
parent 79fbb9ad
...@@ -683,7 +683,9 @@ class Scope(object): ...@@ -683,7 +683,9 @@ class Scope(object):
entry.is_implemented = True entry.is_implemented = True
if modifiers: if modifiers:
entry.func_modifiers = modifiers entry.func_modifiers = modifiers
entry.utility_code = utility_code if utility_code:
assert not entry.utility_code, "duplicate utility code definition in entry %s (%s)" % (name, cname)
entry.utility_code = utility_code
type.entry = entry type.entry = entry
return entry return entry
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment