Skip to content

Commit ea225bf

Browse files
committed
Conditional directive
1 parent 10448b6 commit ea225bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Utilities/Compiler/Extensions/ITypeSymbolExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ public static bool IsAttribute(this ITypeSymbol symbol)
294294
public static bool HasValueCopySemantics(this ITypeSymbol typeSymbol)
295295
=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String;
296296

297+
#if !MICROSOFT_CODEANALYSIS_PUBLIC_API_ANALYZERS
297298
public static bool HasReferenceTypeSemantics([NotNullWhen(returnValue: true)] this ITypeSymbol? typeSymbol)
298299
=> typeSymbol.IsReferenceTypeOrNullableValueType() ||
299300
typeSymbol?.IsRefLikeType == true ||
300301
typeSymbol is ITypeParameterSymbol typeParameter && !typeParameter.IsValueType;
302+
#endif
301303

302304
public static bool IsNonNullableValueType([NotNullWhen(returnValue: true)] this ITypeSymbol? typeSymbol)
303305
=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T;

0 commit comments

Comments
 (0)