File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 3131 RefExpr ,
3232 StrExpr ,
3333 TupleExpr ,
34- Var ,
3534)
3635from mypy .types import AnyType , TypeOfAny
3736from mypyc .ir .ops import (
@@ -145,10 +144,11 @@ def apply_function_specialization(
145144 """Invoke the Specializer callback for a function if one has been registered"""
146145 if (
147146 isinstance (callee , NameExpr )
148- and isinstance (callee .node , Var )
147+ # and isinstance(callee.node, Var)
149148 # NOTE: why is this not a weakref rprimitive?
150149 # TODO: fix to weakref rprimitive so _apply_specialization can use the custom_op
151- and str (callee .node .type ).startswith ("weakref.ReferenceType" )
150+ and is_weakref_rprimitive (builder .node_type (callee .node ))
151+ # and str(callee.node.type).startswith("weakref.ReferenceType")
152152 and len (expr .args ) == 0
153153 ):
154154 return builder .call_c (weakref_deref_op , [builder .accept (expr .callee )], expr .line )
Original file line number Diff line number Diff line change 6969 r = r0
7070 r1 = CPyWeakref_GetRef(r)
7171 return r1
72-
You can’t perform that action at this time.
0 commit comments