76 references to ITypeSymbolHelpers
Microsoft.CodeAnalysis (62)
Operations\ControlFlowGraphBuilder.cs (60)
2153
if (
ITypeSymbolHelpers
.IsBooleanType(operation.Type) &&
2154
ITypeSymbolHelpers
.IsBooleanType(operation.LeftOperand.Type) &&
2155
ITypeSymbolHelpers
.IsBooleanType(operation.RightOperand.Type))
2161
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.Type) &&
2162
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.LeftOperand.Type) &&
2163
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.RightOperand.Type))
2168
else if (
ITypeSymbolHelpers
.IsObjectType(operation.Type) &&
2169
ITypeSymbolHelpers
.IsObjectType(operation.LeftOperand.Type) &&
2170
ITypeSymbolHelpers
.IsObjectType(operation.RightOperand.Type))
2174
else if (
ITypeSymbolHelpers
.IsDynamicType(operation.Type) &&
2175
(
ITypeSymbolHelpers
.IsDynamicType(operation.LeftOperand.Type) ||
2176
ITypeSymbolHelpers
.IsDynamicType(operation.RightOperand.Type)))
2248
ITypeSymbolHelpers
.IsBooleanType(operation.Type) &&
2249
ITypeSymbolHelpers
.IsBooleanType(operation.Operand.Type);
2471
if (
ITypeSymbolHelpers
.IsBooleanType(left.Type))
2476
else if (
ITypeSymbolHelpers
.IsDynamicType(left.Type) || unaryOperatorMethod != null)
2481
(
ITypeSymbolHelpers
.IsBooleanType(unaryOperatorMethod.ReturnType) &&
2482
(
ITypeSymbolHelpers
.IsNullableType(left.Type) || !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))))
2508
if (!
ITypeSymbolHelpers
.IsDynamicType(left.Type))
2568
if (
ITypeSymbolHelpers
.IsNullableType(left.Type))
2570
if (unaryOperatorMethod == null ? isLifted : !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))
2576
Debug.Assert(unaryOperatorMethod == null || !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type));
2580
else if (unaryOperatorMethod != null &&
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))
2585
if (unaryOperatorMethod != null &&
ITypeSymbolHelpers
.IsBooleanType(unaryOperatorMethod.ReturnType))
2687
Debug.Assert(
ITypeSymbolHelpers
.IsBooleanType(condition.Type));
2736
ITypeSymbolHelpers
.IsBooleanType(binOp.Type) &&
2737
ITypeSymbolHelpers
.IsBooleanType(binOp.LeftOperand.Type) &&
2738
ITypeSymbolHelpers
.IsBooleanType(binOp.RightOperand.Type);
2849
if (
ITypeSymbolHelpers
.IsBooleanType(condition.Type))
2854
if (
ITypeSymbolHelpers
.IsBooleanType(conditional.WhenTrue.Type) &&
2855
ITypeSymbolHelpers
.IsBooleanType(conditional.WhenFalse.Type))
2874
if (
ITypeSymbolHelpers
.IsBooleanType(condition.Type))
2878
if (
ITypeSymbolHelpers
.IsBooleanType(coalesce.WhenNull.Type))
2990
if (
ITypeSymbolHelpers
.IsNullableType(valueTypeOpt) &&
2991
(!testConversion.IsIdentity || !
ITypeSymbolHelpers
.IsNullableType(operation.Type)))
3297
Debug.Assert(
ITypeSymbolHelpers
.IsBooleanType(booleanType));
3315
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(valueType));
3338
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(value.Type));
3340
MakeInvalidOperation(
ITypeSymbolHelpers
.GetNullableUnderlyingType(value.Type), value);
3413
if (
ITypeSymbolHelpers
.IsNullableType(operation.Type) && !
ITypeSymbolHelpers
.IsNullableType(currentConditionalAccess.WhenNotNull.Type))
3441
(operation.Type.IsReferenceType && !
ITypeSymbolHelpers
.IsNullableType(operation.Type))
3529
if (
ITypeSymbolHelpers
.IsNullableType(testExpressionType))
4176
return type?.IsValueType == true && !
ITypeSymbolHelpers
.IsNullableType(type);
4658
ITypeSymbol? stepEnumUnderlyingTypeOrSelf =
ITypeSymbolHelpers
.GetEnumUnderlyingTypeOrSelf(operation.StepValue.Type);
4818
!
ITypeSymbolHelpers
.IsSignedIntegralType(stepEnumUnderlyingTypeOrSelf) &&
4819
!
ITypeSymbolHelpers
.IsUnsignedIntegralType(stepEnumUnderlyingTypeOrSelf))
4823
if (
ITypeSymbolHelpers
.IsNullableType(stepValue.Type))
4829
ITypeSymbol? stepValueEnumUnderlyingTypeOrSelf =
ITypeSymbolHelpers
.GetEnumUnderlyingTypeOrSelf(stepValue.Type);
4831
if (
ITypeSymbolHelpers
.IsNumericType(stepValueEnumUnderlyingTypeOrSelf))
4986
if (
ITypeSymbolHelpers
.IsUnsignedIntegralType(stepEnumUnderlyingTypeOrSelf))
5006
if (comparisonKind == BinaryOperatorKind.None &&
ITypeSymbolHelpers
.IsSignedIntegralType(stepEnumUnderlyingTypeOrSelf))
5052
if (
ITypeSymbolHelpers
.IsNullableType(operation.LimitValue.Type))
5223
bool isNullable =
ITypeSymbolHelpers
.IsNullableType(operation.StepValue.Type);
5283
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(controlVariableReferenceForIncrement.Type));
5456
bool leftIsNullable =
ITypeSymbolHelpers
.IsNullableType(operation.Value.Type);
5457
bool rightIsNullable =
ITypeSymbolHelpers
.IsNullableType(compareWith.Type);
5567
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(type));
5568
Debug.Assert(
ITypeSymbolHelpers
.GetNullableUnderlyingType(type).Equals(operand.Type));
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
93
if (
ITypeSymbolHelpers
.IsNullableType(type))
95
type =
ITypeSymbolHelpers
.GetNullableUnderlyingType(type);
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
88
!
ITypeSymbolHelpers
.IsNullableType(type) && !type.IsValueType)
217
if (
ITypeSymbolHelpers
.IsNullableType(symbol) && !symbol.IsDefinition)
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
20
else if (type.IsReferenceType || type.TypeKind == TypeKind.Pointer ||
ITypeSymbolHelpers
.IsNullableType(type))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (2)
663
return
ITypeSymbolHelpers
.IsNullableType(typeOpt);
668
return
ITypeSymbolHelpers
.GetNullableUnderlyingType(type);
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\ControlFlowGraphVerifier.cs (8)
987
(
ITypeSymbolHelpers
.IsDynamicType(binOp.Type) &&
988
(
ITypeSymbolHelpers
.IsDynamicType(binOp.LeftOperand.Type) ||
ITypeSymbolHelpers
.IsDynamicType(binOp.RightOperand.Type)))))
1037
ITypeSymbolHelpers
.IsNullableType(reference.Type) &&
1903
!
ITypeSymbolHelpers
.IsBooleanType(binary.Type) &&
1904
!
ITypeSymbolHelpers
.IsNullableOfBoolean(binary.Type) &&
1905
!
ITypeSymbolHelpers
.IsObjectType(binary.Type) &&
1906
!
ITypeSymbolHelpers
.IsDynamicType(binary.Type));
Microsoft.CodeAnalysis.VisualBasic (1)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (1)
100
If
ITypeSymbolHelpers
.IsNullableType(symbol) AndAlso symbol IsNot symbol.OriginalDefinition Then