File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Analysis/Ast/Impl/Types/Collections Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,12 @@ bool isMutable
57
57
public override PythonMemberType MemberType => PythonMemberType . Class ;
58
58
public override IMember GetMember ( string name ) => name == @"__iter__" ? IteratorType : base . GetMember ( name ) ;
59
59
60
- public override IMember CreateInstance ( IArgumentSet args )
61
- => new PythonCollection ( this , args . Arguments . Select ( a => a . Value ) . OfType < IMember > ( ) . ToArray ( ) ) ;
60
+ public override IMember CreateInstance ( IArgumentSet args ) {
61
+ var contents = args ? . Arguments == null
62
+ ? Array . Empty < IMember > ( ) :
63
+ args . Arguments . Select ( a => a . Value ) . OfType < IMember > ( ) . ToArray ( ) ;
64
+ return new PythonCollection ( this , contents ) ;
65
+ }
62
66
63
67
public override IMember Call ( IPythonInstance instance , string memberName , IArgumentSet args )
64
68
=> DeclaringModule . Interpreter . GetBuiltinType ( TypeId ) ? . Call ( instance , memberName , args ) ;
You can’t perform that action at this time.
0 commit comments