File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,7 @@ public Value[] CastedValues
1414
1515 List < Value > list = [ ] ;
1616 list . AddRange ( from object item in value select Parse ( item ) ) ;
17- if ( list . Any ( i => i is not LiteralValue and not ReferenceValue ) )
18- {
19- throw new ScriptRuntimeError ( "Collection was detected with illegal values." ) ;
20- }
21-
17+
2218 if ( list . Select ( i => i . GetType ( ) ) . Distinct ( ) . Count ( ) > 1 )
2319 {
2420 throw new ScriptRuntimeError ( "Collection was detected with mixed types." ) ;
@@ -44,8 +40,6 @@ public TryGet<Value> GetAt(int index)
4440
4541 public override string ToString ( )
4642 {
47- List < string > objects = [ ] ;
48- objects . AddRange ( from object ? obj in CastedValues select obj ? . ToString ( ) ?? "???" ) ;
49- return $ "[{ string . Join ( ", " , objects ) } ]";
43+ return $ "[{ string . Join ( ", " , CastedValues . Select ( v => v . ToString ( ) ) ) } ]";
5044 }
5145}
You can’t perform that action at this time.
0 commit comments