Binder\Binder_Conversions.cs (33)
911_node.Syntax,
918hasWithElement: _node.WithElement != null,
919_node,
923WasCompilerGenerated = _node.IsParamsArrayOrCollection,
924IsParamsArrayOrCollection = _node.IsParamsArrayOrCollection,
935return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: false, _diagnostics);
946_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax);
951return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: true, _diagnostics);
953Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
954Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
965var syntax = _node.Syntax;
966var hasSpreadElements = _node.HasSpreadElements(out _, out _);
968if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.Compilation))
1015var syntax = _node.Syntax;
1037var collectionCreation = bindCollectionConstructorConstruction(in this, _node.WithElement?.Syntax ?? _node.Syntax, constructor);
1043var elements = _node.Elements;
1090var withElement = @this._node.WithElement;
1136var elements = _node.Elements;
1203var syntax = _node.Syntax;
1215if (_node.WithElement != null)
1220_node.WithElement.Syntax.GetFirstToken().GetLocation(),
1230if (_node.WithElement?.Arguments.Length > 0 &&
1235_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
1246var withElement = @this._node.WithElement;
1334var collectionBuilderMethods = @this._binder.GetCollectionBuilderMethods(@this._node.Syntax, namedType, @this._diagnostics, forParams: false);
1352var analyzedArguments = @this._node.WithElement is null
1354: AnalyzedArguments.GetInstance(@this._node.WithElement.Arguments, @this._node.WithElement.ArgumentRefKindsOpt, @this._node.WithElement.ArgumentNamesOpt);
1359var syntax = @this._node.WithElement?.Syntax ?? @this._node.Syntax;
1447WasCompilerGenerated = @this._node.WithElement is null,