summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-1/sugar.cpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-12 07:38:19 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-12 07:38:19 -0800
commitdf58c6cd5c26120a985cca74243fc7978457ff2e (patch)
tree0a61ca17a83dc3484c9a2b1c69c83b64849d958f /starts/meaning-vm/level-1/sugar.cpp
parent931c924ed0b23fea8179644e5f7f1da866c7c07e (diff)
downloadstandingwithresilience-df58c6cd5c26120a985cca74243fc7978457ff2e.tar.gz
standingwithresilience-df58c6cd5c26120a985cca74243fc7978457ff2e.zip
tried to use allocations with level1 ... messy, works, for some reason name of function is output in dump, shows internal problem
Diffstat (limited to 'starts/meaning-vm/level-1/sugar.cpp')
-rw-r--r--starts/meaning-vm/level-1/sugar.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/starts/meaning-vm/level-1/sugar.cpp b/starts/meaning-vm/level-1/sugar.cpp
index 21f4001..accad6c 100644
--- a/starts/meaning-vm/level-1/sugar.cpp
+++ b/starts/meaning-vm/level-1/sugar.cpp
@@ -50,16 +50,16 @@ ref movetoname(ref anonymous, ref name)
bool nonempty = false;
for (auto & l : name.links()) {
if (l.first.linked(level0::concepts::allocator(), level0::concepts::level0allocations())) { continue; }
- if (l.first == concepts::name) { continue; }
+ if (l.second.isa(concepts::name)) { continue; }
nonempty = true;
}
if (nonempty) {
for (auto & link : anonymous.links()) {
if (link.first == concepts::is && link.second == concepts::anonymous) { continue; }
if (link.first.linked(level0::concepts::allocator(), level0::concepts::level0allocations())) { continue; }
- if (link.first == concepts::name) { continue; }
+ if (link.second.isa(concepts::name)) { continue; }
if (!name.linked(link.first, link.second)) {
- throw std::logic_error(name.name() + " already defined otherwise from " + anonymous.getAll(concepts::is).begin()->name());
+ throw std::logic_error(name.name() + " already defined otherwise from " + anonymous.getAll(concepts::is).begin()->name());// + ": \n" + dump(name, ref("dump"), ref(true)) + dump(anonymous, ref("dump"), ref(true)));
}
}
}