248 references to Type
Microsoft.CodeAnalysis.CSharp (248)
Binder\Binder.CapturedParametersFinder.cs (2)
168if (isTypeOrValueReceiver(enclosingBinder, id, parameter.Type, out SyntaxNode? memberAccessNode, out string? memberName, out int targetMemberArity, out bool invoked)) 171if (TreatAsInstanceMemberAccess(enclosingBinder, parameter.Type, memberAccessNode, memberName, targetMemberArity, invoked, lookupResult))
Binder\Binder.ValueChecks.cs (8)
116Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.IsRefLikeOrAllowsRefLikeType()); 2384parameter.Type.IsRefLikeOrAllowsRefLikeType() && 3403Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 3729Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4073Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything)); 4569Debug.Assert(parameter.Type.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions)); 4574if (LocalRewriter.ShouldUseRuntimeHelpersCreateSpan(expr, ((NamedTypeSymbol)parameter.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type)) 4765Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
Binder\Binder_Attributes.cs (2)
728parameter.Type.TypeKind == TypeKind.Array && 729!((TypeSymbol)reorderedArgument.TypeInternal!).Equals(parameter.Type, TypeCompareKind.AllIgnoreOptions))
Binder\Binder_Conversions.cs (12)
580method.Parameters[0].Type is ArrayTypeSymbol { IsSZArray: true, ElementType: TypeParameterSymbol }); 590static (readonlySpanType, method) => method.Parameters[0].Type.IsSpan() && 640arg.source.Equals(parameter.Type.OriginalDefinition, TypeCompareKind.ConsiderEverything) && 646((NamedTypeSymbol)parameter.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type.Equals(typeArgument.Type, TypeCompareKind.ConsiderEverything) && 669Parameters: [{ Type.SpecialType: SpecialType.System_String }] 1061var parameterType = (NamedTypeSymbol)collectionBuilderMethod.Parameters[0].Type; 1530var conversion = conversions.ConvertExtensionMethodThisArg(constructed.Parameters[0].Type, receiverType, ref useSiteInfo, isMethodGroupConversion: false); 1876if (method.Parameters is not [{ RefKind: RefKind.None, Type: var parameterType }] 1894var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 2842(Conversions.ConvertExtensionMethodThisArg(methodParameters[0].Type, receiverOpt!.Type, ref useSiteInfo, isMethodGroupConversion: true).Exists && useSiteInfo.Diagnostics.IsNullOrEmpty())); 2866source: delegateParameter.Type, 2867destination: methodParameter.Type,
Binder\Binder_Crefs.cs (2)
506if (ContainsNestedTypeOfUnconstructedGenericType(parameterSymbols[i].Type)) 569if (ContainsNestedTypeOfUnconstructedGenericType(param.Type))
Binder\Binder_Expressions.cs (15)
511defaultValueBinder.GenerateConversionForAssignment(parameter.Type, valueBeforeConversion, diagnostics, ConversionForAssignmentFlags.DefaultParameter)); 2092if (IsBadLocalOrParameterCapture(parameter, parameter.Type, parameter.RefKind)) 2100else if (parameter.Type.IsRestrictedType(ignoreSpanLikeTypes: true)) 2102Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, parameter.Type); 2106Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType()); 2116(parameter.RefKind != RefKind.None || parameter.Type.IsRestrictedType()) && 2123else if (parameter.Type.IsRestrictedType(ignoreSpanLikeTypes: true)) 2125Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefAny, node, parameter.Type); 2129Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType()); 3603if (parameters[paramsIndex].Type.IsSZArray()) 3826placeholderType = parameter.Type; 3845placeholderType = parameter.Type; 10036original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 10134original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 10135original.Parameters[1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None };
Binder\Binder_Invocation.cs (8)
681!candidate.Member.GetParameters().Last().Type.IsSZArray()) 1223receiverParameter.Type, diagnostics); 1365var parameterType = parameter.Type; 1599TypeSymbol parameterType = parameter.Type; 1719TypeSymbol collectionType = paramsParameter.Type; 1848!(d.Arguments is [ParameterSymbol shadowedParameter] && shadowedParameter.Type.Equals(typeOrValue.Data.ValueExpression.Type, TypeCompareKind.AllIgnoreOptions))) // If the type and the name match, we would resolve to the same type rather than a value at the end. 2148if (parameter.Name == name) return parameter.Type; 2154return (i < parameterList.Length) ? parameterList[i].Type : null;
Binder\Binder_Statements.cs (2)
2159Error(diagnostics, ErrorFacts.GetStaticClassParameterCode(useWarning: false), anonymousFunction.ParameterLocation(i), delegateParameters[i].Type); 2182var delegateParameterType = delegateParameters[i].Type;
Binder\Binder_Symbols.cs (2)
1429CheckWhatCandidatesWeHave(members, parameter.Type, plainName, 1441Error(diagnostics, ErrorCode.ERR_AmbiguousPrimaryConstructorParameterAsColorColorReceiver, colorColorValueReceiver.Syntax, parameter.Name, parameter.Type, parameter);
Binder\DecisionDagBuilder.cs (1)
541var element = new BoundDagTemp(syntax, method.Parameters[i + extensionExtra].Type, evaluation, i);
Binder\ExecutableCodeBinder.cs (1)
116else if (parameter.Type.IsPointerOrFunctionPointer())
Binder\ForEachLoopBinder.cs (3)
1024? builder.GetEnumeratorInfo.Method.Parameters[0].Type 1529var collectionConversion = this.Conversions.ClassifyConversionFromExpression(collectionExpr, result.Parameters[0].Type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo); 1542result.Parameters[0].Type);
Binder\InMethodBinder.cs (1)
210if ((this.Flags & BinderFlags.InEEMethodBinder) != 0 && parameter.Type.IsDisplayClassType())
Binder\PatternExplainer.cs (1)
547var elementTemp = new BoundDagTemp(e.Syntax, method.Parameters[j + extensionExtra].Type, e, j);
Binder\Semantics\AccessCheck.cs (1)
175if (!IsSymbolAccessibleCore(param.Type, within, throughTypeOpt: null, out failedThroughTypeCheck, compilation, ref useSiteInfo, basesBeingResolved))
Binder\Semantics\Conversions\Conversions.cs (4)
331if (!thisParameter.Type.IsReferenceType) 338thisParameter.Type); 413if (parameter.Type.IsDynamic()) 452if (methodGroup.IsExtensionMethodGroup && !method.Parameters[0].Type.IsReferenceType)
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1519!delegateParameters[p].Type.Equals(anonymousFunction.ParameterType(p), TypeCompareKind.AllIgnoreOptions))
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
1321op1Left = p[0].Type; 1322op1Right = p[1].Type; 1338op2Left = p[0].Type; 1339op2Right = p[1].Type;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
1009if (parameter.Type.ContainsTypeParameter(typeParameter)) 2421if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 2771if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 3099if (!anonymousFunction.ParameterType(p).Equals(fixedDelegateParameters[p].Type, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes))
Binder\Semantics\OverloadResolution\OverloadResolution.cs (8)
1302if ((final.IsParamsArray && final.Type.IsSZArray()) || 1303(final.IsParamsCollection && !final.Type.IsSZArray() && !disallowExpandedNonArrayParams && 1306return TryInferParamsCollectionIterationType(binder, final.OriginalDefinition.Type, out definitionElementType); 2533TypeSymbol t1 = m1LeastOverriddenParameters[^1].Type; 2534TypeSymbol t2 = m2LeastOverriddenParameters[^1].Type; 2555var type = parameter.Type; 3702if (!Conversions.HasIdentityConversion(param1.Type, param2.Type))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1212TypeSymbol parameterType = unwrapIfParamsCollection(badArg, parameter, isLastParameter) is TypeSymbol t ? t : parameter.Type; 1370parameter.Type is NamedTypeSymbol { IsInterpolatedStringHandlerType: true };
BoundTree\Constructors.cs (2)
531: this(syntax, parameterSymbol, parameterSymbol.Type, hasErrors) 536: this(syntax, parameterSymbol, parameterSymbol.Type)
CodeGen\EmitConversion.cs (2)
385if (parameters[0].Type.SpecialType != SpecialType.System_Object) continue; 386var p1t = parameters[1].Type.SpecialType;
CodeGen\EmitExpression.cs (2)
1426var parameterType = parameter.ParameterSymbol.Type; 3301EmitIndirectStore(parameter.ParameterSymbol.Type, parameter.Syntax);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
283retExpression = F.StaticCall(manager.System_String, formatMethod, F.Null(formatMethod.Parameters[0].Type), format, F.ArrayOrEmpty(manager.System_Object, arguments));
Compiler\ClsComplianceChecker.cs (2)
578if (!IsCompliantType(parameter.Type, context)) 580this.AddDiagnostic(ErrorCode.WRN_CLS_BadArgType, parameter.GetFirstLocation(), parameter.Type);
Compiler\MethodBodySynthesizer.cs (3)
184thisReference = new BoundThisReference(syntax, thisSymbol.Type) { WasCompilerGenerated = true }; 280field.IsStatic ? null : new BoundThisReference(syntax, accessor.ThisParameter.Type), 378new BoundThisReference(syntax, thisParameter.Type) { WasCompilerGenerated = true };
Compiler\MethodBodySynthesizer.Lowered.cs (1)
87F.Null(text.Type)),
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
245Visit(symbol.Type, builder);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (4)
409var otherType = (TypeSymbol?)Visit(param.Type); 658_comparer.Equals(parameter.Type, other.Type); 926var translatedParamType = (TypeSymbol)Visit(param.Type);
Emitter\Model\ParameterSymbolAdapter.cs (2)
55return ((PEModuleBuilder)context.Module).Translate(AdaptedParameterSymbol.Type, 95type = AdaptedParameterSymbol.Type;
Emitter\Model\ParameterTypeInformation.cs (1)
53return ((PEModuleBuilder)context.Module).Translate(_underlyingParameter.Type, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
148ImmutableArray.Create(new TypedConstant(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
FlowAnalysis\AbstractFlowPass.cs (2)
1440&& !TypeIsImmutable(thisParameter.Type)) 3015return param.Type.IsNonNullableValueType();
FlowAnalysis\DefiniteAssignment.cs (2)
364if (methodThisParameter.Type.SpecialType.CanOptimizeBehavior()) 474TypeSymbol parameterType = parameter.Type;
FlowAnalysis\NullableWalker.cs (4)
3614(p1, p2) => p1.Type.Equals(p2.Type, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreTupleNames)) && 10633parameterOpt?.Type.IsNonNullableValueType() == true && parameterType.IsNullableType() ? parameterOpt.Type : parameterType, // Compensate for operator lifting
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (1)
215parameter.Type.Equals(F.Compilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken), TypeCompareKind.ConsiderEverything))
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
689type = ((ParameterSymbol)capturedVariable).Type;
Lowering\ClosureConversion\ClosureConversion.cs (4)
242Debug.Assert(thisParameter is null || TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2)); 597if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2)) 610if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2)) 897var frameType = (NamedTypeSymbol)loweredSymbol.Parameters[i].Type.OriginalDefinition;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (6)
702var conversionInputType = method.Parameters[0].Type; 709? Convert(Visit(node.Operand), node.Operand.Type, method.Parameters[0].Type, node.Checked, false) 767unquoted = _bound.Call(_bound.MethodInfo(method, createDelegate.ContainingType), createDelegate, _bound.Typeof(delegateType, createDelegate.Parameters[0].Type), receiver); 774_bound.Typeof(delegateType, createDelegate.Parameters[0].Type), 776_bound.MethodInfo(method, createDelegate.Parameters[2].Type)); 847_bound.Typeof(_typeMap.SubstituteType(p.Type).Type, _bound.WellKnownType(WellKnownType.System_Type)), _bound.Literal(p.Name));
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
581_diagnostics.Add(ErrorCode.ERR_ExpressionTreeCantContainRefStruct, p.GetFirstLocation(), p.Type.Name);
Lowering\DiagnosticsPass_Warnings.cs (2)
370if (parameters.Length == 2 && TypeSymbol.Equals(parameters[0].Type, t, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(parameters[1].Type, t, TypeCompareKind.ConsiderEverything2))
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (9)
312var parameterLogger = GetLocalOrParameterStoreLogger(parameter.Type, parameter, refAssignmentSourceIsLocal: null, _factory.Syntax); 316MakeStoreLoggerArguments(parameterLogger.Parameters[0], parameter, parameter.Type, _factory.Parameter(parameter), refAssignmentSourceIndex: null, _factory.Literal((ushort)parameter.Ordinal))))); 424type = parameterSymbol.Type; 450if (parameter.Type.IsVoidPointer() && !targetType.IsPointerOrFunctionPointer()) 453Debug.Assert(!parameter.Type.IsManagedTypeNoUseSiteDiagnostics); 456(BoundExpression)new BoundAddressOfOperator(_factory.Syntax, value, isManaged: false, parameter.Type) : 457_factory.Sequence(new[] { value }, new BoundAddressOfOperator(_factory.Syntax, VariableRead(targetSymbol), isManaged: false, parameter.Type)); 462if (parameter.Type.SpecialType == SpecialType.System_String && targetType.SpecialType != SpecialType.System_String) 482return ImmutableArray.Create(_factory.Convert(parameter.Type, value), index);
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (1)
186member is MethodSymbol { Parameters: [.., { RefKind: RefKind.None, Type: { } lastParamType }] parametersWithCancellationToken } overload &&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
189var outputTemp = new BoundDagTemp(d.Syntax, parameter.Type, d, i - extensionExtra); 243Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32);
Lowering\LocalRewriter\LocalRewriter_Call.cs (7)
238case (not null, not null) when !methodThisParameter.Type.Equals(interceptorThisParameterForCompare.Type, TypeCompareKind.ObliviousNullableModifierMatchesAny) 281Debug.Assert(receiverOpt.Type.Equals(interceptor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions) 282|| (!receiverOpt.Type.IsReferenceType && interceptor.Parameters[0].Type.IsReferenceType)); 283receiverOpt = MakeConversionNode(receiverOpt, interceptor.Parameters[0].Type, @checked: false, markAsChecked: true); 1174Debug.Assert(parameters[i].Type is NamedTypeSymbol { IsInterpolatedStringHandlerType: true, IsValueType: true }); 1234((MethodSymbol)methodOrIndexer).Parameters[0].Type as NamedTypeSymbol :
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
223ConversionsBase.HasIdentityConversion(builder.Parameters[0].Type, spreadType) && 321Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions)); 465var spanType = (NamedTypeSymbol)constructMethod.Parameters[0].Type;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
1762Conversion fromConversion = TryMakeConversion(syntax, conversion.UserDefinedFromConversion, fromType, meth.Parameters[0].Type, @checked: @checked); 1868Conversion fromConversion = TryMakeConversion(syntax, fromType, meth.Parameters[0].Type, @checked: @checked);
Lowering\LocalRewriter\LocalRewriter_Event.cs (3)
310BoundExpression eventInfo = _factory.New(ctor, _factory.Typeof(node.Event.ContainingType, ctor.Parameters[0].Type), _factory.Literal(node.Event.MetadataName)); 312_factory.Convert(addRemove.Parameters[0].Type, rewrittenReceiver), 313_factory.Convert(addRemove.Parameters[1].Type, rewrittenArgument));
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
243MethodSymbol createSpan = getCreateSpanHelper(node, spanType: getItemOrSliceHelper.ContainingType, intType: (NamedTypeSymbol)getItemOrSliceHelper.Parameters[0].Type);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
142!parameter.Type.IsRestrictedType(), 211var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
140thisParameter.Type.IsReferenceType &&
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
252var proxyField = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, parameter.Name, isPublic: !PreserveInitialParameterValuesAndThreadId); 257var field = F.StateMachineField(typeMap.SubstituteType(parameter.Type).Type, GeneratedNames.StateMachineParameterProxyFieldName(parameter.Name), isPublic: true); 440if (method.IsStatic || method.ThisParameter.Type.IsReferenceType)
Lowering\SyntheticBoundNodeFactory.cs (5)
217return new BoundThisReference(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true }; 238return new BoundParameter(Syntax, p, p.Type) { WasCompilerGenerated = true }; 1187NamedTypeSymbol baseType = CurrentFunction.ThisParameter.Type.BaseTypeNoUseSiteDiagnostics; 1496if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1498arg = Convert(conversion.Method.Parameters[0].Type, arg);
Symbols\Attributes\SourceAttributeData.cs (1)
282TypeSymbol parameterType = parameters[parameterIndex].Type;
Symbols\Compilation_WellKnownMembers.cs (1)
1143return parameter.Type;
Symbols\MemberSymbolExtensions.cs (1)
581return method.ReturnType.ContainsTupleNames() || method.Parameters.Any(static p => p.Type.ContainsTupleNames());
Symbols\Metadata\PE\PEEventSymbol.cs (1)
205TypeSymbol.Equals(_removeMethod.Parameters[0].Type, token, TypeCompareKind.ConsiderEverything2);
Symbols\Metadata\PE\PEParameterSymbol.cs (5)
693&& ContainingAssembly.TypeConversions.HasCallerLineNumberConversion(this.Type, ref discardedUseSiteInfo); 713&& ContainingAssembly.TypeConversions.HasCallerInfoStringConversion(this.Type, ref discardedUseSiteInfo); 734&& ContainingAssembly.TypeConversions.HasCallerInfoStringConversion(this.Type, ref discardedUseSiteInfo); 757&& ContainingAssembly.TypeConversions.HasCallerInfoStringConversion(this.Type, ref discardedUseSiteInfo); 867else if (paramNames.IsDefault || Type is not NamedTypeSymbol { IsInterpolatedStringHandlerType: true })
Symbols\NamedTypeSymbol.cs (2)
363if ((thisParam.RefKind == RefKind.Ref && !thisParam.Type.IsValueType) || 364(thisParam.RefKind is RefKind.In or RefKind.RefReadOnlyParameter && thisParam.Type.TypeKind != TypeKind.Struct))
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
670Debug.Assert(!param.Type.HasCustomModifiers(flagNonDefaultArraySizesOrLowerBounds: false));
Symbols\ParameterSymbol.cs (1)
451ITypeSymbolInternal IParameterSymbolInternal.Type => Type;
Symbols\ReducedExtensionMethodSymbol.cs (2)
52var conversion = conversions.ConvertExtensionMethodThisArg(method.Parameters[0].Type, receiverType, ref useSiteInfo, isMethodGroupConversion: false); 250return _reducedFrom.Parameters[0].Type;
Symbols\Source\CustomModifierUtils.cs (3)
132sourceParameter.Type.HasCustomModifiers(flagNonDefaultArraySizesOrLowerBounds: true) || 134destinationParameter.Type.HasCustomModifiers(flagNonDefaultArraySizesOrLowerBounds: true) || // Could happen if the associated property has custom modifiers. 144builder.Add(destinationParameter.WithCustomModifiersAndParams(sourceParameter.Type,
Symbols\Source\ParameterHelpers.cs (1)
735TypeSymbol parameterType = parameter.Type;
Symbols\Source\SourceComplexParameterSymbol.cs (19)
348new BoundLiteral(parameterSyntax, defaultValue, Type)); 402if (Type.IsNullableType()) 404convertedExpression = binder.GenerateConversionForAssignment(Type.GetNullableUnderlyingType(), 881return UseUpdatedEscapeRules && (RefKind != RefKind.None || (HasParamsModifier && Type.IsRefLikeOrAllowsRefLikeType())); 991if (this.Type.IsReferenceType) 1015else if (!compilation.Conversions.ClassifyConversionFromType((TypeSymbol)arg.TypeInternal, this.Type, isChecked: false, ref useSiteInfo).Kind.IsImplicitConversion()) 1224if (!Type.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken))) 1247if (Type is not NamedTypeSymbol { IsInterpolatedStringHandlerType: true } handlerType) 1250diagnostics.Add(ErrorCode.ERR_TypeIsNotAnInterpolatedStringHandlerType, arguments.AttributeSyntaxOpt.Location, Type); 1509public sealed override bool IsParamsArray => (_parameterSyntaxKind & ParameterFlags.ParamsParameter) != 0 && this.Type.IsSZArray(); 1511public sealed override bool IsParamsCollection => (_parameterSyntaxKind & ParameterFlags.ParamsParameter) != 0 && !this.Type.IsSZArray(); 1539if (DeclaredScope == ScopedKind.ScopedValue && !Type.IsErrorOrRefLikeOrAllowsRefLikeType()) 1556var collectionTypeKind = ConversionsBase.GetCollectionExpressionTypeKind(DeclaringCompilation, Type, out TypeWithAnnotations elementTypeWithAnnotations); 1570binder.TryGetCollectionIterationType(syntax, Type, out elementTypeWithAnnotations); 1578if (!binder.HasCollectionExpressionApplicableConstructor(syntax, Type, out MethodSymbol? constructor, isExpanded: out _, diagnostics, isParamsModifierValidation: true)) 1588if (!binder.HasCollectionExpressionApplicableAddMethod(syntax, Type, out ImmutableArray<MethodSymbol> addMethods, diagnostics)) 1598diagnostics.Add(ErrorCode.ERR_ParamsCollectionExtensionAddMethod, syntax, Type); 1629binder.TryGetCollectionIterationType(syntax, Type, out elementTypeWithAnnotations); 1637MethodSymbol? collectionBuilderMethod = binder.GetAndValidateCollectionBuilderMethod(syntax, (NamedTypeSymbol)Type, diagnostics, elementType: out _);
Symbols\Source\SourceConstructorSymbolBase.cs (1)
98parameter.Type.CheckAllConstraints(compilation, conversions, parameter.GetFirstLocation(), diagnostics);
Symbols\Source\SourceDelegateMethodSymbol.cs (3)
119diagnostics.Add(ErrorCode.ERR_BadVisDelegateParam, delegateType.GetFirstLocation(), delegateType, parameterSymbol.Type); 121else if (!delegateTypeIsFile && parameterSymbol.Type.HasFileLocalTypes()) 123diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, delegateType.GetFirstLocation(), parameterSymbol.Type, delegateType);
Symbols\Source\SourceMemberContainerSymbol.cs (3)
3952if (!propertyParamType.Equals(methodParam.Type, TypeCompareKind.AllIgnoreOptions)) 3970eventSymbol.Type.Equals(methodParams[0].Type, TypeCompareKind.AllIgnoreOptions); 4235primaryAndCopyCtorAmbiguity = ctor.ParameterCount == 1 && ctor.Parameters[0].Type.Equals(this, TypeCompareKind.AllIgnoreOptions);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1395else if (parameters.Any(p => (p.RefKind is RefKind.Ref or RefKind.Out) && p.Type.IsRefLikeOrAllowsRefLikeType())) 1411else if (parameters.Any(p => p.RefKind == RefKind.None && p.Type.IsRefLikeOrAllowsRefLikeType()))
Symbols\Source\SourceMemberMethodSymbol.cs (3)
365diagnostics.Add(code, GetFirstLocation(), this, parameter.Type); 386if (param.Type.HasFileLocalTypes()) 388diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, GetFirstLocation(), param.Type, ContainingType);
Symbols\Source\SourceMethodSymbol.cs (3)
69else if (parameter.Type.IsPointerOrFunctionPointer()) 73else if (parameter.Type.IsRestrictedType()) 75diagnostics.Add(ErrorCode.ERR_BadSpecialByRefParameter, getLocation(parameter, location), parameter.Type);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1396checkAndReportManagedTypes(param.Type, param.RefKind, param.GetNonNullSyntaxNode(), isParam: true, diagnostics);
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1845if (indexer.Parameters is [{ Type: { } type }] && 1876conversion.Parameters[0].Type.Equals(this, TypeCompareKind.AllIgnoreOptions) &&
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (1)
237parameter.Type.CheckAllConstraints(compilation, conversions, parameter.GetFirstLocation(), diagnostics);
Symbols\Source\SourceParameterSymbol.cs (2)
125newType = CustomModifierUtils.CopyTypeCustomModifiers(newType, this.Type, this.ContainingAssembly); 245else if (HasParamsModifier && Type.IsRefLikeOrAllowsRefLikeType())
Symbols\Source\SourcePropertySymbol.cs (4)
655if (!IsExplicitInterfaceImplementation && !this.IsNoMoreVisibleThan(param.Type, ref useSiteInfo)) 657diagnostics.Add(ErrorCode.ERR_BadVisIndexerParam, Location, this, param.Type); 659else if (param.Type.HasFileLocalTypes() && !this.ContainingType.HasFileLocalTypes()) 661diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, param.Type, this.ContainingType);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1764parameter.Type.CheckAllConstraints(DeclaringCompilation, conversions, parameter.GetFirstLocation(), diagnostics);
Symbols\SubstitutedMethodSymbol.cs (1)
168return reduced.Parameters[0].Type;
Symbols\SymbolDistinguisher.cs (1)
147symbol = ((ParameterSymbol)symbol).Type;
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
59if (parameter.Type.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
125ctor.Parameters[0].Type.Equals(ContainingType, TypeCompareKind.AllIgnoreOptions))
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
147method.Parameters[0].Type.Equals(containingType, TypeCompareKind.AllIgnoreOptions) &&
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
73if (!parameter.Type.Equals(type, TypeCompareKind.AllIgnoreOptions))
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
47candidate.Parameters[0].Type.Equals(ContainingType, TypeCompareKind.AllIgnoreOptions))
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
126F.Convert(baseEquals.Parameters[0].Type, other));
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
444if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind))
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
383public override bool IsParamsArray => _isParams && Type.IsSZArray(); 385public override bool IsParamsCollection => _isParams && !Type.IsSZArray();
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
33Debug.Assert(unmatchedValue.Type.SpecialType == SpecialType.System_Object);
Symbols\VarianceSafety.cs (1)
241param.Type,