aboutsummaryrefslogtreecommitdiff
path: root/neb
diff options
context:
space:
mode:
authormryouse2022-07-20 21:30:15 +0000
committermryouse2022-07-20 21:30:15 +0000
commite9f5b77b73fee1a693b3ce61f5b8e3a4922f0efb (patch)
tree8cbeda0e04a6be099e73fc026a7a5b7297dd8610 /neb
parent3bf50285432bb90080f62225152cffd932aee8b9 (diff)
bugfix: add the actual multifunc, not the result of register()
Diffstat (limited to 'neb')
-rw-r--r--neb/std/core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/neb/std/core.py b/neb/std/core.py
index 8d58bd7..9b660bc 100644
--- a/neb/std/core.py
+++ b/neb/std/core.py
@@ -169,7 +169,10 @@ def interpretFunc(symbol, args, env, ns):
func.name = name
if env.contains(name) and isinstance(env.get(name), MultiFunction):
- env.register(name, env.get(name).register(func))
+ # TODO this doesn't check for ambiguity/overwrites!!!
+ mf = env.get(name)
+ mf.register(func)
+ env.register(name, mf)
else:
mf = MultiFunction("name")
mf.register(func)