Commit de7909bb authored by Robert Bradshaw's avatar Robert Bradshaw

static fixes

parent 30113788
...@@ -5310,6 +5310,8 @@ class AttributeNode(ExprNode): ...@@ -5310,6 +5310,8 @@ class AttributeNode(ExprNode):
# C method of an extension type or builtin type. If successful, # C method of an extension type or builtin type. If successful,
# creates a corresponding NameNode and returns it, otherwise # creates a corresponding NameNode and returns it, otherwise
# returns None. # returns None.
if self.obj.is_string_literal:
return
type = self.obj.analyse_as_type(env) type = self.obj.analyse_as_type(env)
if type and (type.is_extension_type or type.is_builtin_type or type.is_cpp_class): if type and (type.is_extension_type or type.is_builtin_type or type.is_cpp_class):
entry = type.scope.lookup_here(self.attribute) entry = type.scope.lookup_here(self.attribute)
......
...@@ -2107,7 +2107,8 @@ class CppClassScope(Scope): ...@@ -2107,7 +2107,8 @@ class CppClassScope(Scope):
entry = self.declare(name, cname, type, pos, visibility) entry = self.declare(name, cname, type, pos, visibility)
entry.is_variable = 1 entry.is_variable = 1
if type.is_cfunction and self.type: if type.is_cfunction and self.type:
entry.func_cname = "%s::%s" % (self.type.declaration_code(""), cname) if not self.type.templates or not any(T.is_fused for T in self.type.templates):
entry.func_cname = "%s::%s" % (self.type.declaration_code(""), cname)
if name != "this" and (defining or name != "<init>"): if name != "this" and (defining or name != "<init>"):
self.var_entries.append(entry) self.var_entries.append(entry)
if type.is_pyobject and not allow_pyobject: if type.is_pyobject and not allow_pyobject:
......
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