/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/CSharp/Portable/BoundTree/BoundCall.cs
30 строк
1 KB
AlekseyTs
Do not make assumptions about content of erroneous BoundCall node based on value of InvokedAsExtensionMethod property (#80256)
16 сен 2025, 17:09
Не верифицирован
16 сен 2025, 17:09
49081fb
Код
Авторство
О чём код?
// 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.Diagnostics; namespace Microsoft.CodeAnalysis.CSharp { internal partial class BoundCall { public bool IsErroneousNode => ResultKind is not LookupResultKind.Viable; private partial void Validate() { Debug.Assert(ResultKind is not LookupResultKind.MemberGroup); Debug.Assert(ResultKind is not LookupResultKind.StaticInstanceMismatch); Debug.Assert(ResultKind is LookupResultKind.Viable || HasErrors); /* Tracking issue: https://github.com/dotnet/roslyn/issues/79426 Debug.Assert(ResultKind is LookupResultKind.Viable || new StackTrace(fNeedFileInfo: false).GetFrame(2)?.GetMethod() switch { { Name: nameof(ErrorCall), DeclaringType: { } declaringType } => declaringType == typeof(BoundCall), { Name: nameof(Update), DeclaringType: { } declaringType } => declaringType == typeof(BoundCall), _ => false }); */ } } }