14 overrides of TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder.ValueChecks.cs (1)
3106public override TypeWithAnnotations TypeWithAnnotations
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
26public override TypeWithAnnotations TypeWithAnnotations { get; }
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
921public override TypeWithAnnotations TypeWithAnnotations
Symbols\SignatureOnlyParameterSymbol.cs (1)
40public override TypeWithAnnotations TypeWithAnnotations { get { return _type; } }
Symbols\Source\LambdaParameterSymbol.cs (1)
36public override TypeWithAnnotations TypeWithAnnotations => _parameterType;
Symbols\Source\SourceClonedParameterSymbol.cs (1)
88public override TypeWithAnnotations TypeWithAnnotations
Symbols\Source\SourceComplexParameterSymbol.cs (2)
1704public override TypeWithAnnotations TypeWithAnnotations => _parameterType; 1736public override TypeWithAnnotations TypeWithAnnotations => _parameterType;
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
44public override TypeWithAnnotations TypeWithAnnotations => _parameterType;
Symbols\Source\ThisParameterSymbol.cs (1)
145public override TypeWithAnnotations TypeWithAnnotations
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (2)
112public override TypeWithAnnotations TypeWithAnnotations => ((PropertySymbol)((SourcePropertyAccessorSymbol)ContainingSymbol).AssociatedSymbol).TypeWithAnnotations; 125public override TypeWithAnnotations TypeWithAnnotations
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
45public override TypeWithAnnotations TypeWithAnnotations => _type;
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
39public override TypeWithAnnotations TypeWithAnnotations
308 references to TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (139)
Binder\Binder_Attributes.cs (1)
400var paramType = parameter.TypeWithAnnotations;
Binder\Binder_Expressions.cs (1)
3466arguments[arg] = coerceArgument(in methodResult, receiver, parameters, argumentsForInterpolationConversion: arguments, argument, arg, parameters[paramNum].TypeWithAnnotations, diagnostics);
Binder\Binder_Invocation.cs (1)
1760isCast ? new ConversionGroup(conversion, parameter.TypeWithAnnotations) : null,
Binder\Binder_Statements.cs (1)
2186if (delegateParameters[i].TypeWithAnnotations.IsStatic)
Binder\Semantics\Conversions\Conversions.cs (1)
437TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers,
Binder\Semantics\Conversions\ConversionsBase.cs (3)
1558if (delegateParameters[p].TypeWithAnnotations.IsStatic) 3404if (!hasConversion(sourceParam.RefKind, destinationSig.Parameters[i].TypeWithAnnotations, sourceSig.Parameters[i].TypeWithAnnotations, ref useSiteInfo))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (10)
1596ExactInference(anonymousFunction.ParameterTypeWithAnnotations(i), delegateParameters[i].TypeWithAnnotations, ref useSiteInfo); 2451UpperBoundInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2455ExactInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2801LowerBoundInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2805ExactInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 3206[extension.ExtensionParameter.TypeWithAnnotations],
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3920types.Add(parameter.TypeWithAnnotations); 4057var type = parameter.TypeWithAnnotations;
Binder\Semantics\OverloadResolution\OverloadResolution_ArgsToParameters.cs (1)
62return [symbol.ContainingType.ExtensionParameter.TypeWithAnnotations, .. symbol.GetParameterTypes()];
BoundTree\UnboundLambda.cs (1)
1133typesBuilder.Add(p.TypeWithAnnotations);
Compilation\CSharpCompilation.cs (1)
2270var firstType = method.Parameters[0].TypeWithAnnotations;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (10)
425otherParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(otherType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers))); 524(x, y) => isCorrespondingType(x.TypeWithAnnotations, y.TypeWithAnnotations) && 694ValidateFunctionPointerParamOrReturn(param.TypeWithAnnotations, param.RefKind, param.RefCustomModifiers, allowOut: true); 695ValidateFunctionPointerParamOrReturn(otherParam.TypeWithAnnotations, otherParam.RefKind, otherParam.RefCustomModifiers, allowOut: true); 697return param.RefKind == otherParam.RefKind && AreTypesEqual(param.TypeWithAnnotations, otherParam.TypeWithAnnotations); 934translatedParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(translatedParamType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers)));
Emitter\Model\ParameterSymbolAdapter.cs (1)
33return ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedParameterSymbol.TypeWithAnnotations.CustomModifiers);
Emitter\Model\ParameterTypeInformation.cs (1)
31return ImmutableArray<Cci.ICustomModifier>.CastUp(_underlyingParameter.TypeWithAnnotations.CustomModifiers);
FlowAnalysis\NullableWalker.cs (22)
601EnterParameter(methodThisParameter, methodThisParameter.TypeWithAnnotations); 606EnterParameter(extensionParameter, extensionParameter.TypeWithAnnotations); 1362(hasMaybeNullWhenFalse && ShouldReportNullableAssignment(parameter.TypeWithAnnotations, parameterState)); 1370(hasMaybeNullWhenTrue && ShouldReportNullableAssignment(parameter.TypeWithAnnotations, parameterState)); 2022parameterType = parameter.TypeWithAnnotations; 2969var parameterType = i >= signatureParameters.Length ? parameter.TypeWithAnnotations : signatureParameters[i].TypeWithAnnotations; 3004var parameterLValueType = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 3919reinferredParameter.TypeWithAnnotations, 5447var targetTypeWithNullability = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 6780var parameterType = method.Parameters[0].TypeWithAnnotations; 8256var type = parameter.TypeWithAnnotations; 9877var parameterType = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 10325var parameterType = parameter.TypeWithAnnotations; 10740var nestedRight = CreatePlaceholderIfNecessary(invocation.Arguments[i + offset], parameter.TypeWithAnnotations); 10746parameter, parameter.TypeWithAnnotations, GetParameterAnnotations(parameter), new VisitResult(variable.Type.ToTypeWithState(), variable.Type), 10759variable.Expression, parameter.RefKind, parameter, parameter.TypeWithAnnotations, GetRValueAnnotations(parameter), 11032targetTypeOfOperandConversion = incrementOperator.Parameters[0].TypeWithAnnotations; 11307parameter.TypeWithAnnotations; 11961parameter.TypeWithAnnotations, 12194trueFalseParameter.TypeWithAnnotations, 12638parameter.TypeWithAnnotations,
FlowAnalysis\NullableWalker_Patterns.cs (1)
451var parameterType = method.Parameters[i + extensionExtra].TypeWithAnnotations;
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
136return frame.TypeMap.SubstituteType(((object)local != null ? local.TypeWithAnnotations : ((ParameterSymbol)variable).TypeWithAnnotations).Type).Type;
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
623if (p.TypeWithAnnotations.IsRestrictedType())
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
100Debug.Assert(parameter.TypeWithAnnotations.IsRestrictedType()); 105diagnostics.Add(ErrorCode.ERR_ByRefTypeAndAwait, syntax.Location, parameter.TypeWithAnnotations);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
124this.TypeMap.SubstituteType(p.OriginalDefinition.TypeWithAnnotations),
Symbols\Compilation_WellKnownMembers.cs (1)
1009handle(param.RefKind, param.RefCustomModifiers, param.TypeWithAnnotations);
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
132get { return _containingMethod._typeMap.SubstituteType(this._underlyingParameter.TypeWithAnnotations); }
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
81TypeSymbol parameterType = parameter.TypeWithAnnotations.Type;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
599param.TypeWithAnnotations.AddNullableTransforms(transforms); 613madeParamChanges |= param.TypeWithAnnotations.ApplyNullableTransforms(defaultTransformFlag, transforms, ref position, out var newParamType);
Symbols\MemberSignatureComparer.cs (2)
792var type1 = SubstituteType(typeMap1, param1.TypeWithAnnotations); 793var type2 = SubstituteType(typeMap2, param2.TypeWithAnnotations);
Symbols\MemberSymbolExtensions.cs (2)
444var paramType = param.TypeWithAnnotations; 493var paramType = param.TypeWithAnnotations;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
369var (transformedParamType, paramTransformed) = handle(ref this, param.RefKind, param.RefCustomModifiers, param.TypeWithAnnotations);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
260var substituted = candidateParam.TypeWithAnnotations.SubstituteType(candidateMethodTypeMap);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
188if (TransformTypeWithAnnotations(param.TypeWithAnnotations) is not { } transformedParam) 193paramsModified = paramsModified || !transformedParam.IsSameAs(param.TypeWithAnnotations);
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
221var decodedParam = DecodeTypeInternal(param.TypeWithAnnotations); 222paramsModified = paramsModified || !decodedParam.IsSameAs(param.TypeWithAnnotations);
Symbols\NativeIntegerTypeSymbol.cs (1)
429public override TypeWithAnnotations TypeWithAnnotations => _containingType.SubstituteUnderlyingType(_underlyingParameter.TypeWithAnnotations);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
669Debug.Assert(!(param.TypeWithAnnotations.CustomModifiers.Any() || param.RefCustomModifiers.Any()));
Symbols\ParameterSignature.cs (1)
44types.Add(parameter.TypeWithAnnotations);
Symbols\ParameterSymbol.cs (1)
54public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\PublicModel\ParameterSymbol.cs (3)
32Interlocked.CompareExchange(ref _lazyType, _underlying.TypeWithAnnotations.GetPublicSymbol(), null); 39CodeAnalysis.NullableAnnotation IParameterSymbol.NullableAnnotation => _underlying.TypeWithAnnotations.ToPublicAnnotation(); 43get { return _underlying.TypeWithAnnotations.CustomModifiers; }
Symbols\ReducedExtensionMethodSymbol.cs (2)
255_reducedFrom.Parameters[0].TypeWithAnnotations.ToPublicAnnotation(); 642get { return _containingMethod._typeMap.SubstituteType(this._underlyingParameter.TypeWithAnnotations); }
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
47new TypeWithAnnotations.Boxed(this.RetargetingModule.RetargetingTranslator.Retarget(_underlyingParameter.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode)),
Symbols\Retargeting\RetargetingSymbolTranslator.cs (4)
778var newParameterType = Retarget(parameter.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode); 782parametersModified = parametersModified || !parameter.TypeWithAnnotations.IsSameAs(newParameterType) || customModifiersChanged; 1004translator.Retarget(param.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode), 1078self.Retarget(param.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode),
Symbols\Source\CustomModifierUtils.cs (3)
131if (sourceParameter.TypeWithAnnotations.CustomModifiers.Any() || sourceParameter.RefCustomModifiers.Any() || 133destinationParameter.TypeWithAnnotations.CustomModifiers.Any() || destinationParameter.RefCustomModifiers.Any() || 145sourceParameter.TypeWithAnnotations.CustomModifiers,
Symbols\Source\ParameterHelpers.cs (3)
322ReportParameterErrors(owner, parameterSyntax, parameter.Ordinal, lastParameterIndex: lastIndex, isParams: parameter.IsParams, typeWithAnnotations: parameter.TypeWithAnnotations, 409if (parameter.TypeWithAnnotations.ContainsNativeIntegerWrapperType()) 507if (parameter.TypeWithAnnotations.NeedsNullableAttribute())
Symbols\Source\SourceClonedParameterSymbol.cs (1)
90get { return _originalParam.TypeWithAnnotations; }
Symbols\Source\SourceComplexParameterSymbol.cs (8)
1067else if (!compilation.Conversions.HasCallerLineNumberConversion(TypeWithAnnotations.Type, ref useSiteInfo)) 1071diagnostics.Add(ErrorCode.ERR_NoConversionForCallerLineNumberParam, node.Name.Location, intType, TypeWithAnnotations.Type); 1095else if (!compilation.Conversions.HasCallerInfoStringConversion(TypeWithAnnotations.Type, ref useSiteInfo)) 1099diagnostics.Add(ErrorCode.ERR_NoConversionForCallerFilePathParam, node.Name.Location, stringType, TypeWithAnnotations.Type); 1128else if (!compilation.Conversions.HasCallerInfoStringConversion(TypeWithAnnotations.Type, ref useSiteInfo)) 1132diagnostics.Add(ErrorCode.ERR_NoConversionForCallerMemberNameParam, node.Name.Location, stringType, TypeWithAnnotations.Type); 1169else if (!compilation.Conversions.HasCallerInfoStringConversion(TypeWithAnnotations.Type, ref useSiteInfo)) 1173diagnostics.Add(ErrorCode.ERR_NoConversionForCallerArgumentExpressionParam, node.Name.Location, stringType, TypeWithAnnotations.Type);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
117if (!parameterSymbol.TypeWithAnnotations.IsAtLeastAsVisibleAs(delegateType, ref useSiteInfo))
Symbols\Source\SourceMemberContainerSymbol.cs (6)
4499var propertyParamType = (((i == numParams - 1) && !getNotSet) ? propertySymbol.TypeWithAnnotations : propertyParams[i].TypeWithAnnotations).Type; 4906ctor.Parameters.SelectAsArray<ParameterSymbol, ParameterSymbol>(param => new SignatureOnlyParameterSymbol(param.TypeWithAnnotations, 5147param.TypeWithAnnotations, 5166&& field.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions)) 5175&& prop.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions)) 5193param.TypeWithAnnotations,
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1299var baseParameterType = baseParameter.TypeWithAnnotations; 1302var overrideParameterType = getNotNullIfNotNullOutputType(overrideParameter.TypeWithAnnotations, overrideParameter.NotNullIfParameterNotNull); 1337if (notNullIfParameterNotNull.Contains(overrideParam.Name) && NullableWalker.GetParameterState(baseParam.TypeWithAnnotations, baseParam.FlowAnalysisAnnotations).IsNotNull)
Symbols\Source\SourceMemberMethodSymbol.cs (2)
374if (!parameter.TypeWithAnnotations.IsAtLeastAsVisibleAs(this, ref useSiteInfo)) 383if (!extensionParameter.TypeWithAnnotations.IsAtLeastAsVisibleAs(this, ref useSiteInfo))
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
350Debug.Assert(parameter.TypeWithAnnotations.CustomModifiers.IsEmpty);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
180forceMethodTypeParameters(param.TypeWithAnnotations, this, declaredConstraints); 210var parameter0Type = this.Parameters[0].TypeWithAnnotations;
Symbols\Source\SourceParameterSymbol.cs (1)
127TypeWithAnnotations newTypeWithModifiers = this.TypeWithAnnotations.WithTypeAndModifiers(newType, newCustomModifiers);
Symbols\Source\SourceParameterSymbolBase.cs (1)
98var type = parameter.TypeWithAnnotations;
Symbols\SubstitutedParameterSymbol.cs (2)
60TypeWithAnnotations substituted = ((TypeMap)mapOrType).SubstituteType(this._underlyingParameter.TypeWithAnnotations); 63this._underlyingParameter.TypeWithAnnotations.CustomModifiers.IsEmpty &&
Symbols\Symbol.cs (3)
1248return DeriveUseSiteInfoFromType(ref result, param.TypeWithAnnotations, AllowedRequiredModifierType.None) || 1384if (parameter.TypeWithAnnotations.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes) || 1680builder.AddValue(((ParameterSymbol)this).TypeWithAnnotations);
Symbols\SymbolExtensions.cs (1)
512returnType = parameter.TypeWithAnnotations;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
53=> ParameterSymbol.TypeWithAnnotations;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
39param.TypeWithAnnotations,
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
96return (BackingParameter.TypeWithAnnotations,
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
311oldParam.TypeWithAnnotations,
Symbols\TypeSymbolExtensions.cs (3)
981(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 998next = currentPointer.Parameters[i].TypeWithAnnotations; 2056var paramType = param.TypeWithAnnotations;
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
41get { return _underlyingParameter.TypeWithAnnotations; }
Utilities\TypeSymbolExtensions.cs (1)
120if (!param.RefCustomModifiers.IsEmpty || checkTypeWithAnnotations(param.TypeWithAnnotations, flagNonDefaultArraySizesOrLowerBounds))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (47)
CodeGen\CodeGenLocalFunctionTests.cs (2)
5367Assert.Equal(NullableAnnotation.Annotated, param.TypeWithAnnotations.NullableAnnotation); 6170var synthesizedParam = SynthesizedParameterSymbol.Create(localFunction, param.TypeWithAnnotations, ordinal: 0, RefKind.Out, param.Name, baseParameterForAttributes: (SourceComplexParameterSymbolBase)param);
CodeGen\CodeGenTupleTest.cs (2)
951var partialParamType = partialNamesMethod.Parameters.Single().TypeWithAnnotations; 957var allNullParamType = allNullNamesMethod.Parameters.Single().TypeWithAnnotations;
Emit\EmitCustomModifiers.cs (3)
607Assert.False(parameter.TypeWithAnnotations.CustomModifiers.IsEmpty); 663Assert.False(baseParameter.TypeWithAnnotations.CustomModifiers.IsEmpty); 671Assert.False(derivedParameter.TypeWithAnnotations.CustomModifiers.IsEmpty);
Emit\EmitMetadataTests.cs (2)
2095Assert.Equal(invoke.Parameters[i].TypeWithAnnotations, endInvoke.Parameters[k].TypeWithAnnotations);
Emit\InAttributeModifierTests.cs (38)
1656Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1676Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1862Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1882Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1962Assert.Empty(invokeParameter.TypeWithAnnotations.CustomModifiers); 1966Assert.Empty(beginInvokeParameter.TypeWithAnnotations.CustomModifiers); 1970Assert.Empty(endInvokeParameter.TypeWithAnnotations.CustomModifiers); 2011Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2031Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2051Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2071Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2092Assert.Empty(parameters[0].TypeWithAnnotations.CustomModifiers); 2095Assert.Empty(parameters[1].TypeWithAnnotations.CustomModifiers); 2115Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2502Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2528Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2550Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2575Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2597Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2623Assert.Empty(implicitParameter.TypeWithAnnotations.CustomModifiers); 2630Assert.Empty(explicitParameter.TypeWithAnnotations.CustomModifiers); 2652Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2678Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2700Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2725Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3201Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3227Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3249Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3275Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3297Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3323Assert.Empty(implicitParameter.TypeWithAnnotations.CustomModifiers); 3330Assert.Empty(explicitParameter.TypeWithAnnotations.CustomModifiers); 3352Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3378Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3400Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3426Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3673Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3745Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Attributes\AttributeTests_Dynamic.cs (1)
538Assert.Equal("System.Boolean[]", dynamicAttribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Synthesized.cs (2)
65Assert.Equal("System.Int32", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString()); 93Assert.Equal("System.Diagnostics.DebuggableAttribute.DebuggingModes", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Tuples.cs (1)
629Assert.Equal("System.String[]", tupleAttr.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\ExtensionTests.cs (2)
4180AssertEx.Equal("System.String?", m.GlobalNamespace.GetMember<MethodSymbol>("Extensions.<>E__0.<Extension>$").Parameters[0].TypeWithAnnotations.ToTestDisplayString()); 4181AssertEx.Equal("System.String?", m.GlobalNamespace.GetMember<MethodSymbol>("Extensions.<>E__1.<Extension>$").Parameters[0].TypeWithAnnotations.ToTestDisplayString());
Semantics\RecordTests.cs (2)
12558var parameterType = method.Parameters[0].TypeWithAnnotations; 12559Assert.True(method.OverriddenMethod.Parameters[0].TypeWithAnnotations.Equals(parameterType, TypeCompareKind.ConsiderEverything));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (60)
Semantics\NativeIntegerTests.cs (2)
586verifyTypes(parameter.TypeWithAnnotations, underlyingParameter.TypeWithAnnotations);
Semantics\NullableReferenceTypesTests.cs (55)
8808TypeWithAnnotations getParameterType(CSharpCompilation c) => c.GetMember<MethodSymbol>("A.F").Parameters[0].TypeWithAnnotations; 8939Assert.Equal(NullableAnnotation.Oblivious, indexer.Parameters[0].TypeWithAnnotations.NullableAnnotation); 8942Assert.Equal(NullableAnnotation.Oblivious, method.Parameters[0].TypeWithAnnotations.NullableAnnotation); 8992verifyTuple(method.Parameters[0].TypeWithAnnotations); 9054Assert.Equal(NullableAnnotation.Oblivious, parameter.TypeWithAnnotations.NullableAnnotation); 12100Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 12347Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12348Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12429Assert.Equal(expectMatch, member.Parameters.Single().TypeWithAnnotations.Equals(member.OverriddenMethod.Parameters.Single().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12715Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12716Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12803Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12804Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12900Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13052Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13143Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13688Assert.False(m1.Parameters[0].TypeWithAnnotations.Equals(m1.OverriddenMethod.ConstructIfGeneric(m1.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 13899Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 14135Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14140Assert.True(m3.Parameters[0].TypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 16504Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 16512Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 16635Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenProperty.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16641Assert.True(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenProperty.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16651Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16720Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16726Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16736Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16805Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16811Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16821Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 17734Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 17742Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 17881Assert.False(m1Impl.Parameters[i].TypeWithAnnotations.Equals(m1Def.Parameters[i].TypeWithAnnotations, 17885Assert.True(m1Impl.Parameters[3].TypeWithAnnotations.Equals(m1Def.Parameters[3].TypeWithAnnotations, 139464Assert.True(dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation == NullableAnnotation.Annotated); 139492Assert.Equal(NullableAnnotation.Annotated, c2Goo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 139663Assert.Equal(NullableAnnotation.Annotated, dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 150036var parameterType = method.Parameters[0].TypeWithAnnotations;
Semantics\SemanticAnalyzerTests.cs (3)
1468Assert.Equal("Int32", call.Constructor.Parameters[0].TypeWithAnnotations.Type.Name); 1503Assert.Equal("String", call.Constructor.Parameters[0].TypeWithAnnotations.Type.Name); 1538Assert.Equal("Int32", newExpr.Constructor.Parameters[0].TypeWithAnnotations.Type.Name);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (53)
Symbols\CorLibrary\CorTypes.cs (1)
45Parameters[0].TypeWithAnnotations;
Symbols\CustomModifiersTests.cs (3)
1235Assert.True(test.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.SetMethod.Parameters.First().TypeWithAnnotations.CustomModifiers)); 2482var t1 = test1.Parameters[0].TypeWithAnnotations; 2483var t2 = test2.Parameters[0].TypeWithAnnotations;
Symbols\Metadata\PE\LoadCustomModifiers.cs (6)
58Assert.Equal(1, p1.TypeWithAnnotations.CustomModifiers.Length); 60var p1Mod = p1.TypeWithAnnotations.CustomModifiers[0]; 65Assert.Equal(2, p2.TypeWithAnnotations.CustomModifiers.Length); 67foreach (var p2Mod in p2.TypeWithAnnotations.CustomModifiers) 86Assert.Equal(0, p5.TypeWithAnnotations.CustomModifiers.Length); 98Assert.Equal(0, p6.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Metadata\PE\LoadingIndexers.cs (2)
727Assert.NotEqual(parameterModoptIndexer.Parameters.Last().TypeWithAnnotations.CustomModifiers.Length, parameterModoptIndexer.GetMethod.Parameters.Last().TypeWithAnnotations.CustomModifiers.Length);
Symbols\Metadata\PE\LoadingMethods.cs (1)
76Assert.Equal(0, localM1_1.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Retargeting\RetargetCustomModifiers.cs (8)
70Assert.Equal(1, p1.TypeWithAnnotations.CustomModifiers.Length); 72var p1Mod = p1.TypeWithAnnotations.CustomModifiers[0]; 78Assert.Equal(2, p2.TypeWithAnnotations.CustomModifiers.Length); 80foreach (var p2Mod in p2.TypeWithAnnotations.CustomModifiers) 95Assert.Equal(0, p5.TypeWithAnnotations.CustomModifiers.Length); 108Assert.Equal(0, p6.TypeWithAnnotations.CustomModifiers.Length); 205Assert.Equal(0, p1.TypeWithAnnotations.CustomModifiers.Length); 215Assert.Equal(0, p1.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Retargeting\RetargetingTests.cs (6)
891getModifierTypeSymbol(param1Original.TypeWithAnnotations.CustomModifiers), 892getModifierTypeSymbol(param1Retargeted.TypeWithAnnotations.CustomModifiers)); 901getModifierTypeSymbol(param2Original.TypeWithAnnotations.CustomModifiers), 902getModifierTypeSymbol(param2Retargeted.TypeWithAnnotations.CustomModifiers)); 1248CheckSymbols(a.TypeWithAnnotations, b.TypeWithAnnotations, false);
Symbols\Source\CustomModifierCopyTests.cs (25)
456CheckCustomModifier(onParameterType, method.Parameters.Single().TypeWithAnnotations.CustomModifiers); 552Assert.False(class3Method1.Parameters.Single().TypeWithAnnotations.CustomModifiers.Any()); 596var classMethod1CustomModifiers = classMethod1.Parameters.Single().TypeWithAnnotations.CustomModifiers; 1795Assert.Equal(int16Type, baseProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1796Assert.Equal(int16Type, derivedProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1801Assert.Equal(int16Type, baseIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1802Assert.Equal(int16Type, derivedIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1804Assert.Equal(int32Type, baseIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1805Assert.Equal(int32Type, derivedIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1807Assert.Equal(int64Type, baseIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1808Assert.Equal(int64Type, derivedIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1917Assert.Equal(int16Type, baseIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1918Assert.Equal(int16Type, derivedIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2009Assert.Equal(int16Type, interfaceProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2010Assert.Equal(int16Type, implementationProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2015Assert.Equal(int16Type, interfaceIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2016Assert.Equal(int16Type, implementationIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2018Assert.Equal(int32Type, interfaceIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2019Assert.Equal(int32Type, implementationIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2021Assert.Equal(int64Type, interfaceIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2022Assert.Equal(int64Type, implementationIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2116Assert.Equal(int16Type, interfaceIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2117Assert.Equal(int16Type, implementationIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2145Assert.Equal(ConstModOptType, param.TypeWithAnnotations.CustomModifiers.Single().Modifier.ToTestDisplayString()); 2154Assert.Equal(0, param.TypeWithAnnotations.CustomModifiers.Length);
Symbols\SymbolErrorTests.cs (1)
3374var ptype = param.TypeWithAnnotations;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
96if (UsesIsNullable(parameter.TypeWithAnnotations, inProgress))