38 references to IsRestrictedType
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_AnonymousTypes.cs (1)
231else if (expressionType.IsRestrictedType())
Binder\Binder_Conversions.cs (2)
731if (elementType.IsPointerOrFunctionPointer() || elementType.IsRestrictedType()) 735else if (inlineArrayType.IsRestrictedType())
Binder\Binder_Expressions.cs (10)
1246if ((object)argument.Type != null && argument.Type.IsRestrictedType()) 1932if (refKind != RefKind.None || type.IsRestrictedType()) 2056if (localSymbol.RefKind == RefKind.None && type.IsRestrictedType(ignoreSpanLikeTypes: true)) 2100else if (parameter.Type.IsRestrictedType(ignoreSpanLikeTypes: true)) 2116(parameter.RefKind != RefKind.None || parameter.Type.IsRestrictedType()) && 2123else if (parameter.Type.IsRestrictedType(ignoreSpanLikeTypes: true)) 3246&& type.IsRestrictedType()) 4077if (bestType.IsRestrictedType()) 7559if (typeArgument.Type.IsPointerOrFunctionPointer() || typeArgument.Type.IsRestrictedType()) 10975if ((!accessType.IsReferenceType && !accessType.IsValueType) || accessType.IsPointerOrFunctionPointer() || accessType.IsRestrictedType())
Binder\Binder_Invocation.cs (3)
1050if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1056else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.IsRestrictedType()) 1069dynInvoke.Expression.Type.IsRestrictedType())
Binder\Binder_Operators.cs (3)
363return !type.IsPointerOrFunctionPointer() && !type.IsRestrictedType() && !type.IsVoidType(); 3518if (targetType.IsRestrictedType() || operandType.IsRestrictedType())
Binder\ForEachLoopBinder.cs (1)
528if (builder.InlineArraySpanType == WellKnownType.Unknown && getEnumeratorType.IsRestrictedType() && (IsDirectlyInIterator || IsInAsyncMethod()))
Binder\Semantics\Conversions\Conversions.cs (1)
458if (method.RequiresInstanceReceiver && methodGroup.Receiver?.Type?.IsRestrictedType() == true)
Binder\Semantics\Conversions\ConversionsBase.cs (2)
3342if (source.IsRestrictedType()) 3825if (destination.IsRestrictedType())
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
698if (type.IsRestrictedType() == true)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
378type.IsRestrictedType())
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (3)
142!parameter.Type.IsRestrictedType(), 146!local.Type.IsRestrictedType(), 212if (type.IsRestrictedType() ||
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
335(type.IsTypeParameter() || !type.IsRestrictedType(ignoreSpanLikeTypes: runtimeSupportsByRefLikeGenerics)) &&
Symbols\Source\SourceMemberFieldSymbol.cs (1)
62else if (type.IsRestrictedType(ignoreSpanLikeTypes: true))
Symbols\Source\SourceMethodSymbol.cs (1)
73else if (parameter.Type.IsRestrictedType())
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1682if (!this.IsRestrictedType(ignoreSpanLikeTypes: true)) 1892else if (this.IsRestrictedType())
Symbols\Source\SourcePropertySymbolBase.cs (1)
1833if (type.IsRestrictedType(ignoreSpanLikeTypes: true))
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
144else if (parameterType.IsRestrictedType())
Symbols\TypeSymbolExtensions.cs (1)
149&& !type.IsRestrictedType();
Symbols\TypeWithAnnotations.cs (2)
898internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes); 971internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes);