fix &
This commit is contained in:
parent
5c199984ed
commit
4271f3debe
@ -337,8 +337,8 @@ class DTree(object):
|
|||||||
|
|
||||||
def _generate_dispatch(self, i, user_vars, lib_vars):
|
def _generate_dispatch(self, i, user_vars, lib_vars):
|
||||||
if i == len(self.subtrees):
|
if i == len(self.subtrees):
|
||||||
return PrologLiteral("throw(gecode_argument_error(%s(%s),arg=%d))" \
|
return PrologLiteral("throw(error(type_error(%s(X%d),gecode_argument_error(%s(%s),arg=%d)))" \
|
||||||
% (self.cluster.name, ",".join(user_vars),
|
% (self.subtrees[i][0], self.index+1. self.cluster.name, ",".join(user_vars),
|
||||||
self.index+1))
|
self.index+1))
|
||||||
typ, dtree = self.subtrees[i]
|
typ, dtree = self.subtrees[i]
|
||||||
idx = self.index
|
idx = self.index
|
||||||
@ -664,6 +664,8 @@ class CCDescriptor(object):
|
|||||||
v2 = v
|
v2 = v
|
||||||
else:
|
else:
|
||||||
t2 = t
|
t2 = t
|
||||||
|
if t.endswith("&"):
|
||||||
|
t = t.rstrip("&")
|
||||||
if t.startswith("std::function") and t.endswith(")>"):
|
if t.startswith("std::function") and t.endswith(")>"):
|
||||||
sp = t.split("&")
|
sp = t.split("&")
|
||||||
if len(sp) > 1:
|
if len(sp) > 1:
|
||||||
|
Reference in New Issue
Block a user