Binder\Binder_Conversions.cs (34)
919_node.Syntax,
926hasWithElement: _node.WithElement != null,
927_node,
931WasCompilerGenerated = _node.IsParamsArrayOrCollection,
932IsParamsArrayOrCollection = _node.IsParamsArrayOrCollection,
943return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: false, _diagnostics);
954_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax);
959return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: true, _diagnostics);
961Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
962Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
973var syntax = _node.Syntax;
974var hasSpreadElements = _node.HasSpreadElements(out _, out _);
976if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.Compilation))
1023var syntax = _node.Syntax;
1038Debug.Assert(_node.WithElement is null);
1046var collectionCreation = bindCollectionConstructorConstruction(in this, _node.WithElement?.Syntax ?? _node.Syntax, constructor);
1052var elements = _node.Elements;
1099var withElement = @this._node.WithElement;
1154var elements = _node.Elements;
1221var syntax = _node.Syntax;
1233if (_node.WithElement != null)
1238_node.WithElement.Syntax.GetFirstToken().GetLocation(),
1248if (_node.WithElement?.Arguments.Length > 0 &&
1253_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
1264var withElement = @this._node.WithElement;
1358var collectionBuilderMethods = @this._binder.GetCollectionBuilderMethods(@this._node.Syntax, namedType, @this._diagnostics, forParams: false);
1376var analyzedArguments = @this._node.WithElement is null
1378: AnalyzedArguments.GetInstance(@this._node.WithElement.Arguments, @this._node.WithElement.ArgumentRefKindsOpt, @this._node.WithElement.ArgumentNamesOpt);
1383var syntax = @this._node.WithElement?.Syntax ?? @this._node.Syntax;
1471WasCompilerGenerated = @this._node.WithElement is null,