Binder\Binder_Conversions.cs (33)
861_node.Syntax,
868hasWithElement: _node.WithElement != null,
869_node,
873WasCompilerGenerated = _node.IsParamsArrayOrCollection,
874IsParamsArrayOrCollection = _node.IsParamsArrayOrCollection,
885return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: false, _diagnostics);
896_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax);
901return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: true, _diagnostics);
903Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
904Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
915var syntax = _node.Syntax;
916var hasSpreadElements = _node.HasSpreadElements(out _, out _);
918if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.Compilation))
965var syntax = _node.Syntax;
987var collectionCreation = bindCollectionConstructorConstruction(in this, _node.WithElement?.Syntax ?? _node.Syntax, constructor);
993var elements = _node.Elements;
1040var withElement = @this._node.WithElement;
1086var elements = _node.Elements;
1153var syntax = _node.Syntax;
1165if (_node.WithElement != null)
1170_node.WithElement.Syntax.GetFirstToken().GetLocation(),
1180if (_node.WithElement?.Arguments.Length > 0 &&
1185_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
1196var withElement = @this._node.WithElement;
1284var collectionBuilderMethods = @this._binder.GetCollectionBuilderMethods(@this._node.Syntax, namedType, @this._diagnostics, forParams: false);
1302var analyzedArguments = @this._node.WithElement is null
1304: AnalyzedArguments.GetInstance(@this._node.WithElement.Arguments, @this._node.WithElement.ArgumentRefKindsOpt, @this._node.WithElement.ArgumentNamesOpt);
1309var syntax = @this._node.WithElement?.Syntax ?? @this._node.Syntax;
1397WasCompilerGenerated = @this._node.WithElement is null,