Binder\Binder_Conversions.cs (33)
863_node.Syntax,
870hasWithElement: _node.WithElement != null,
871_node,
875WasCompilerGenerated = _node.IsParamsArrayOrCollection,
876IsParamsArrayOrCollection = _node.IsParamsArrayOrCollection,
887return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: false, _diagnostics);
898_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax);
903return _binder.BindCollectionExpressionForErrorRecovery(_node, _targetType, inConversion: true, _diagnostics);
905Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
906Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
917var syntax = _node.Syntax;
918var hasSpreadElements = _node.HasSpreadElements(out _, out _);
920if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.Compilation))
967var syntax = _node.Syntax;
989var collectionCreation = bindCollectionConstructorConstruction(in this, _node.WithElement?.Syntax ?? _node.Syntax, constructor);
995var elements = _node.Elements;
1042var withElement = @this._node.WithElement;
1088var elements = _node.Elements;
1155var syntax = _node.Syntax;
1167if (_node.WithElement != null)
1172_node.WithElement.Syntax.GetFirstToken().GetLocation(),
1182if (_node.WithElement?.Arguments.Length > 0 &&
1187_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
1198var withElement = @this._node.WithElement;
1286var collectionBuilderMethods = @this._binder.GetCollectionBuilderMethods(@this._node.Syntax, namedType, @this._diagnostics, forParams: false);
1304var analyzedArguments = @this._node.WithElement is null
1306: AnalyzedArguments.GetInstance(@this._node.WithElement.Arguments, @this._node.WithElement.ArgumentRefKindsOpt, @this._node.WithElement.ArgumentNamesOpt);
1311var syntax = @this._node.WithElement?.Syntax ?? @this._node.Syntax;
1399WasCompilerGenerated = @this._node.WithElement is null,