42 references to IsRestrictedType
Microsoft.CodeAnalysis.CSharp (39)
Binder\Binder_AnonymousTypes.cs (1)
231
else if (expressionType.
IsRestrictedType
())
Binder\Binder_Conversions.cs (2)
731
if (elementType.IsPointerOrFunctionPointer() || elementType.
IsRestrictedType
())
735
else if (inlineArrayType.
IsRestrictedType
())
Binder\Binder_Expressions.cs (10)
1253
if ((object)argument.Type != null && argument.Type.
IsRestrictedType
())
1974
if (refKind != RefKind.None || type.
IsRestrictedType
())
2098
if (localSymbol.RefKind == RefKind.None && type.
IsRestrictedType
(ignoreSpanLikeTypes: true))
2150
else if (parameter.Type.
IsRestrictedType
(ignoreSpanLikeTypes: true))
2166
(parameter.RefKind != RefKind.None || parameter.Type.
IsRestrictedType
()) &&
2173
else if (parameter.Type.
IsRestrictedType
(ignoreSpanLikeTypes: true))
3298
&& type.
IsRestrictedType
())
4142
if (bestType.
IsRestrictedType
())
7620
if (typeArgument.Type.IsPointerOrFunctionPointer() || typeArgument.Type.
IsRestrictedType
())
11362
if ((!accessType.IsReferenceType && !accessType.IsValueType) || accessType.IsPointerOrFunctionPointer() || accessType.
IsRestrictedType
())
Binder\Binder_Invocation.cs (3)
1073
if (call.ReceiverOpt.Type.
IsRestrictedType
() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2))
1079
else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.
IsRestrictedType
())
1092
dynInvoke.Expression.Type.
IsRestrictedType
())
Binder\Binder_Operators.cs (3)
762
return !type.IsPointerOrFunctionPointer() && !type.
IsRestrictedType
() && !type.IsVoidType();
4945
if (targetType.
IsRestrictedType
() || operandType.
IsRestrictedType
())
Binder\ForEachLoopBinder.cs (1)
542
if (builder.InlineArraySpanType == WellKnownType.Unknown && getEnumeratorType.
IsRestrictedType
() && (IsDirectlyInIterator || IsInAsyncMethod()))
Binder\Semantics\Conversions\Conversions.cs (1)
480
if (method.RequiresInstanceReceiver && methodGroup.Receiver?.Type?.
IsRestrictedType
() == true)
Binder\Semantics\Conversions\ConversionsBase.cs (2)
3340
if (source.
IsRestrictedType
())
3823
if (destination.
IsRestrictedType
())
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
698
if (type.
IsRestrictedType
() == true)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
403
type.
IsRestrictedType
())
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (3)
149
!parameter.Type.
IsRestrictedType
(),
153
!local.Type.
IsRestrictedType
(),
231
if (type.
IsRestrictedType
() ||
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
329
(type.IsTypeParameter() || !type.
IsRestrictedType
(ignoreSpanLikeTypes: runtimeSupportsByRefLikeGenerics)) &&
Symbols\Source\SourceMemberFieldSymbol.cs (1)
63
else if (type.
IsRestrictedType
(ignoreSpanLikeTypes: true))
Symbols\Source\SourceMethodSymbol.cs (1)
80
else if (parameter.Type.
IsRestrictedType
())
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1708
if (!this.
IsRestrictedType
(ignoreSpanLikeTypes: true))
1953
else if (this.
IsRestrictedType
())
Symbols\Source\SourcePropertySymbolBase.cs (1)
1877
if (type.
IsRestrictedType
(ignoreSpanLikeTypes: true))
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
139
if (parameterType.IsPointerOrFunctionPointer() || parameterType.
IsRestrictedType
())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
216
else if (!value.Type.
IsRestrictedType
())
Symbols\TypeSymbolExtensions.cs (1)
150
&& !type.
IsRestrictedType
();
Symbols\TypeWithAnnotations.cs (2)
898
internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.
IsRestrictedType
(ignoreSpanLikeTypes);
971
internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.
IsRestrictedType
(ignoreSpanLikeTypes);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_IsByRefLike.cs (1)
1069
var shouldHaveMarker = hasCompilerFeatureRequired && !peType.
IsRestrictedType
(ignoreSpanLikeTypes: true);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\OperatorTests.cs (2)
8161
if (leftType.IsDynamic() && !rightType.IsPointerType() && !rightType.
IsRestrictedType
())
8165
else if (rightType.IsDynamic() && !leftType.IsPointerType() && !leftType.
IsRestrictedType
())