/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/ConversionExtensions.cs
16 строк
747 B
Cyrus Najmabadi
Fix crash when seeing if code can be converted to collection expressions
22 янв 2026, 14:31
22 янв 2026, 14:31
eff138c
Код
Авторство
О чём код?
// 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 Microsoft.CodeAnalysis.Shared.Extensions; namespace Microsoft.CodeAnalysis.CSharp.Extensions; internal static class ConversionExtensions { public static bool IsIdentityOrImplicitReference(this Conversion conversion) => CommonConversionExtensions.IsIdentityOrImplicitReference(conversion.ToCommonConversion()); public static bool IsImplicitUserDefinedConversion(this Conversion conversion) => conversion is { IsUserDefined: true, MethodSymbol: { MethodKind: MethodKind.Conversion, Name: "op_Implicit" } }; }