/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_AnonymousObjectCreation.cs
37 строк
2 KB
AlekseyTs
Null annotate ArgumentNames. (#70739)
09 ноя 2023, 17:24
Не верифицирован
09 ноя 2023, 17:24
5e2cf6d
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Diagnostics; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; namespace Microsoft.CodeAnalysis.CSharp { internal sealed partial class LocalRewriter { public override BoundNode VisitAnonymousObjectCreationExpression(BoundAnonymousObjectCreationExpression node) { // We should never encounter an interpolated string handler conversion that was implicitly inferred, because // there are no target types for an anonymous object creation. AssertNoImplicitInterpolatedStringHandlerConversions(node.Arguments); // Rewrite the arguments. var rewrittenArguments = VisitList(node.Arguments); return new BoundObjectCreationExpression( syntax: node.Syntax, constructor: node.Constructor, arguments: rewrittenArguments, argumentNamesOpt: default(ImmutableArray<string?>), argumentRefKindsOpt: default(ImmutableArray<RefKind>), expanded: false, argsToParamsOpt: default(ImmutableArray<int>), defaultArguments: default(BitVector), constantValueOpt: null, initializerExpressionOpt: null, type: node.Type); } } }