Binder\Binder_Conversions.cs (34)
920_node.Syntax,
927hasWithElement: _node.WithElement != null,
928_node,
932WasCompilerGenerated = _node.IsParamsArrayOrCollection,
933IsParamsArrayOrCollection = _node.IsParamsArrayOrCollection,
944return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: false, _diagnostics);
955_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax);
960return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: true, _diagnostics);
962Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
963Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
974var syntax = _node.Syntax;
975var hasSpreadElements = _node.HasSpreadElements(out _, out _);
977if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.Compilation))
1024var syntax = _node.Syntax;
1039Debug.Assert(_node.WithElement is null);
1047var collectionCreation = bindCollectionConstructorConstruction(in this, _node.WithElement?.Syntax ?? _node.Syntax, constructor);
1053var elements = _node.Elements;
1100var withElement = @this._node.WithElement;
1155var elements = _node.Elements;
1222var syntax = _node.Syntax;
1234if (_node.WithElement != null)
1239_node.WithElement.Syntax.GetFirstToken().GetLocation(),
1249if (_node.WithElement?.Arguments.Length > 0 &&
1254_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
1265var withElement = @this._node.WithElement;
1359var collectionBuilderMethods = @this._binder.GetCollectionBuilderMethods(@this._node.Syntax, namedType, @this._diagnostics, forParams: false);
1377var analyzedArguments = @this._node.WithElement is null
1379: AnalyzedArguments.GetInstance(@this._node.WithElement.Arguments, @this._node.WithElement.ArgumentRefKindsOpt, @this._node.WithElement.ArgumentNamesOpt);
1384var syntax = @this._node.WithElement?.Syntax ?? @this._node.Syntax;
1472WasCompilerGenerated = @this._node.WithElement is null,