@@ -641,7 +641,7 @@ def set_line(self,
641641class FuncItem (FuncBase ):
642642 """Base class for nodes usable as overloaded function items."""
643643
644- __slots__ = ('arguments' , # Note that can be None if deserialized (type is a lie!)
644+ __slots__ = ('arguments' , # Note that items can be None if deserialized (type is a lie!)
645645 'arg_names' , # Names of arguments
646646 'arg_kinds' , # Kinds of arguments
647647 'min_args' , # Minimum number of arguments
@@ -657,7 +657,7 @@ class FuncItem(FuncBase):
657657 'expanded' , # Variants of function with type variables with values expanded
658658 )
659659
660- __deletable__ = ('arguments' , ' max_pos' , 'min_args' )
660+ __deletable__ = ('max_pos' , 'min_args' )
661661
662662 def __init__ (self ,
663663 arguments : List [Argument ],
@@ -770,8 +770,10 @@ def deserialize(cls, data: JsonDict) -> 'FuncDef':
770770 # NOTE: ret.info is set in the fixup phase.
771771 ret .arg_names = data ['arg_names' ]
772772 ret .arg_kinds = [ArgKind (x ) for x in data ['arg_kinds' ]]
773+ ret .arguments = []
774+ for argname , argkind in zip (ret .arg_names , ret .arg_kinds ):
775+ ret .arguments += [Argument (Var (argname or "" ), None , None , argkind )]
773776 # Leave these uninitialized so that future uses will trigger an error
774- del ret .arguments
775777 del ret .max_pos
776778 del ret .min_args
777779 return ret
0 commit comments