38 overrides of ReturnTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (38)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
145public override TypeWithAnnotations ReturnTypeWithAnnotations
Lowering\SynthesizedMethodBaseSymbol.cs (1)
191public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
58public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (1)
43public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (1)
47public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
44public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (1)
47public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\ErrorMethodSymbol.cs (1)
165public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
42public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
768public override TypeWithAnnotations ReturnTypeWithAnnotations { get; }
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
684public override TypeWithAnnotations ReturnTypeWithAnnotations => Signature.ReturnParam.TypeWithAnnotations;
Symbols\NativeIntegerTypeSymbol.cs (1)
359public override TypeWithAnnotations ReturnTypeWithAnnotations => _container.SubstituteUnderlyingType(UnderlyingMethod.ReturnTypeWithAnnotations);
Symbols\ReducedExtensionMethodSymbol.cs (1)
495public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
133public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\SignatureOnlyMethodSymbol.cs (1)
77public override TypeWithAnnotations ReturnTypeWithAnnotations { get { return _returnType; } }
Symbols\Source\LambdaSymbol.cs (1)
160public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\LocalFunctionSymbol.cs (1)
244public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourceConstructorSymbolBase.cs (1)
151public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
159public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourceDestructorSymbol.cs (1)
121public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourceEventAccessorSymbol.cs (1)
160public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (1)
185public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
376public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\SubstitutedMethodSymbol.cs (1)
235public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedCollectionBuilderProjectedMethodSymbol.cs (1)
48public override TypeWithAnnotations ReturnTypeWithAnnotations => this.UnderlyingMethod.ReturnTypeWithAnnotations;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
170public override TypeWithAnnotations ReturnTypeWithAnnotations { get; }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
432public override TypeWithAnnotations ReturnTypeWithAnnotations => TypeWithAnnotations.Create(_userEntryPointInvocation.Type); 498public override TypeWithAnnotations ReturnTypeWithAnnotations => _returnType; 597public override TypeWithAnnotations ReturnTypeWithAnnotations => _returnType;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
211public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
101public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
154public sealed override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
144public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
225public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedPropertySymbol.cs (1)
91public override TypeWithAnnotations ReturnTypeWithAnnotations => _property.TypeWithAnnotations;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
189public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
160public override TypeWithAnnotations ReturnTypeWithAnnotations
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
135public override TypeWithAnnotations ReturnTypeWithAnnotations
215 references to ReturnTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (66)
Binder\Binder_Expressions.cs (1)
11480var returnType = returnTypeOverride ?? methodSymbol.ReturnTypeWithAnnotations;
Binder\ForEachLoopBinder.cs (2)
268diagnostics.Add(ErrorCode.ERR_BadGetAsyncEnumerator, expr.Location, getEnumeratorMethod.ReturnTypeWithAnnotations, getEnumeratorMethod); 1186builder.ElementTypeWithAnnotations = builder.CurrentPropertyGetter?.ReturnTypeWithAnnotations ?? TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Object, diagnostics, errorLocationSyntax));
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
110return method.ReturnTypeWithAnnotations; 1420var returnType = delegateType.DelegateInvokeMethod.ReturnTypeWithAnnotations; 1475TypeWithAnnotations sourceReturnType = method.ReturnTypeWithAnnotations; 1630ExactInference(anonymousFunctionReturnType, delegateInvokeMethod.ReturnTypeWithAnnotations, ref useSiteInfo);
BoundTree\UnboundLambda.cs (1)
687return invokeMethod.ReturnTypeWithAnnotations;
CodeGen\CodeGenerator.cs (1)
176var returnTypeWithAnnotations = _method.ReturnTypeWithAnnotations;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
535isCorrespondingType(invokeMethod.ReturnTypeWithAnnotations, otherInvokeMethod.ReturnTypeWithAnnotations);
Emitter\Model\MethodReference.cs (1)
89return ImmutableArray<Cci.ICustomModifier>.CastUp(UnderlyingMethod.ReturnTypeWithAnnotations.CustomModifiers);
Emitter\Model\MethodSymbolAdapter.cs (1)
230return ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedMethodSymbol.ReturnTypeWithAnnotations.CustomModifiers);
FlowAnalysis\NullableWalker.cs (14)
3168var returnType = delegateOrMethod.ReturnTypeWithAnnotations; 3624placeholderResult = new VisitResult(GetReturnTypeWithState(patternDisposeMethod), patternDisposeMethod.ReturnTypeWithAnnotations); 4190return ApplyUnconditionalAnnotations(createMethod.ReturnTypeWithAnnotations, annotations).ToTypeWithState().State; 5349return GetLiftedReturnType(methodOpt.ReturnTypeWithAnnotations, leftType.State.Join(rightType.State)); 6918SetResult(node, returnState, method.ReturnTypeWithAnnotations); 7330return TypeWithState.Create(method.ReturnTypeWithAnnotations, GetRValueAnnotations(method)); 8805return method.ReturnTypeWithAnnotations; 10470var methodReturnType = method.ReturnTypeWithAnnotations; 11747targetTypeOfOperandConversion = operandConversion.Method.ReturnTypeWithAnnotations; 11804resultOfIncrementType = GetLiftedReturnTypeIfNecessary(isLifted, incrementOperator.ReturnTypeWithAnnotations, operandType.State); 12481currentPropertyGetter.ReturnTypeWithAnnotations.ToTypeWithState(), 12489var result = new VisitResult(GetReturnTypeWithState(moveNextAsyncMethod), moveNextAsyncMethod.ReturnTypeWithAnnotations); 12730resultType = GetLiftedReturnTypeIfNecessary(isLifted, method.ReturnTypeWithAnnotations, operandResult.State); 13002SetResultType(node, reinferredGetResult.ReturnTypeWithAnnotations.ToTypeWithState());
Lowering\LocalRewriter\LocalRewriter.cs (1)
420predicate(localFunction.ReturnTypeWithAnnotations) || localFunction.ParameterTypesWithAnnotations.Any(predicate);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
193get { return this.TypeMap.SubstituteType(this.BaseMethod.OriginalDefinition.ReturnTypeWithAnnotations); }
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
44get { return _typeMap.SubstituteType(_originalMethod.ReturnTypeWithAnnotations); }
Symbols\MemberSymbolExtensions.cs (1)
450var methodReturnType = method.ReturnTypeWithAnnotations;
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
284TypeWithAnnotations candidateMethodType = candidateMethod.ReturnTypeWithAnnotations;
Symbols\MethodSymbol.cs (4)
256public TypeSymbol ReturnType => ReturnTypeWithAnnotations.Type; 973if (DeriveUseSiteInfoFromType(ref result, this.ReturnTypeWithAnnotations, 990if (this.ReturnTypeWithAnnotations.GetUnificationUseSiteDiagnosticRecursive(ref diagnosticInfo, this, ref unificationCheckedTypes) || 1176var type = this.ReturnTypeWithAnnotations;
Symbols\NativeIntegerTypeSymbol.cs (1)
359public override TypeWithAnnotations ReturnTypeWithAnnotations => _container.SubstituteUnderlyingType(UnderlyingMethod.ReturnTypeWithAnnotations);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
893var methodReturnType = method.ReturnTypeWithAnnotations;
Symbols\PublicModel\MethodSymbol.cs (3)
86Interlocked.CompareExchange(ref _lazyReturnType, _underlying.ReturnTypeWithAnnotations.GetPublicSymbol(), null); 97return _underlying.ReturnTypeWithAnnotations.ToPublicAnnotation(); 268return _underlying.ReturnTypeWithAnnotations.CustomModifiers;
Symbols\ReducedExtensionMethodSymbol.cs (1)
497get { return _typeMap.SubstituteType(_reducedFrom.ReturnTypeWithAnnotations); }
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
140new TypeWithAnnotations.Boxed(this.RetargetingTranslator.Retarget(_underlyingMethod.ReturnTypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode, this.ContainingType)),
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1025translator.Retarget(method.ReturnTypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode),
Symbols\Source\CustomModifierUtils.cs (2)
47returnType = destinationMethod.ReturnTypeWithAnnotations; // Default value - in case we don't copy the custom modifiers. 50var sourceMethodReturnType = constructedSourceMethod.ReturnTypeWithAnnotations;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
1019else if (!IsValidOverrideReturnType(overridingMethod, overridingMethod.ReturnTypeWithAnnotations, overriddenMethod.ReturnTypeWithAnnotations, diagnostics)) 1026if (DeclaringCompilation.Conversions.HasIdentityOrImplicitReferenceConversion(overridingMethod.ReturnTypeWithAnnotations.Type, overriddenMethod.ReturnTypeWithAnnotations.Type, ref discardedUseSiteInfo)) 1300var overrideReturnType = getNotNullIfNotNullOutputType(overrideMethod.ReturnTypeWithAnnotations, overrideMethod.ReturnNotNullIfParameterNotNull); 1306baseMethod.ReturnTypeWithAnnotations.Type)) 1315baseMethod.ReturnTypeWithAnnotations,
Symbols\Source\SourceMemberMethodSymbol.cs (2)
907var unusedType = this.ReturnTypeWithAnnotations; 1025builder.AddValue(method.ReturnTypeWithAnnotations);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
491bool hasTypeDifferences = !constructedDefinition.ReturnTypeWithAnnotations.Equals(implementation.ReturnTypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
Symbols\SubstitutedMethodSymbol.cs (1)
241var returnType = Map.SubstituteType(OriginalDefinition.ReturnTypeWithAnnotations);
Symbols\SymbolExtensions.cs (1)
489returnType = method.ReturnTypeWithAnnotations;
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
99baseClone.ReturnTypeWithAnnotations :
Symbols\Synthesized\SynthesizedCollectionBuilderProjectedMethodSymbol.cs (1)
48public override TypeWithAnnotations ReturnTypeWithAnnotations => this.UnderlyingMethod.ReturnTypeWithAnnotations;
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
103get { return _interfaceMethod.ReturnTypeWithAnnotations; }
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
193return _overriddenAccessor.ReturnTypeWithAnnotations;
Symbols\TypeSymbol.cs (1)
1617interfaceMethod.ReturnTypeWithAnnotations,
Symbols\TypeSymbolExtensions.cs (3)
1004next = currentPointer.ReturnTypeWithAnnotations; 1009typeWithAnnotationsOpt: canDigThroughNullable ? default : currentPointer.ReturnTypeWithAnnotations, 1010type: canDigThroughNullable ? currentPointer.ReturnTypeWithAnnotations.NullableUnderlyingTypeOrSelf : null,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (63)
CodeGen\CodeGenLocalFunctionTests.cs (1)
5363Assert.Equal(NullableAnnotation.Annotated, localFn1.ReturnTypeWithAnnotations.NullableAnnotation);
CodeGen\CodeGenTupleTest.cs (2)
22284Assert.Equal("(System.Int32, System.Int32)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString()); 22324Assert.Equal("(System.Int32 Item1, System.Int32 Bob)[missing]", methodM.ReturnTypeWithAnnotations.ToTestDisplayString());
Emit\EmitMetadataTests.cs (2)
618Assert.Equal("Void", ctor.ReturnTypeWithAnnotations.Type.Name); 640Assert.Equal("Void", cctor.ReturnTypeWithAnnotations.Type.Name);
Emit\InAttributeModifierTests.cs (58)
1699Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1719Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1740Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1775Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1819Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1879Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1887Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1902Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 1936Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1944Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 1960Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 1986Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2002Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2031Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2039Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2054Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2082Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2095Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2131Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2145Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2173Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2187Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2214Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2222Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2237Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2272Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2280Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2296Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2323Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2338Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2370Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2405Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2418Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2475Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2511Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2525Assert.Empty(localFunc.ReturnTypeWithAnnotations.CustomModifiers); 2555Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2589Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2623Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2648Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 2876Assert.Empty(invokeMethod.ReturnTypeWithAnnotations.CustomModifiers); 2880Assert.Empty(endInvokeMethod.ReturnTypeWithAnnotations.CustomModifiers); 3636Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 3659Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 3681Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 3704Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 3726Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 3749Assert.Empty(implicitMethod.ReturnTypeWithAnnotations.CustomModifiers); 3771Assert.Empty(implicitMethod.ReturnTypeWithAnnotations.CustomModifiers); 3794Assert.Empty(implicitMethod.ReturnTypeWithAnnotations.CustomModifiers); 3816Assert.Empty(implicitMethod.ReturnTypeWithAnnotations.CustomModifiers); 3839Assert.Empty(implicitMethod.ReturnTypeWithAnnotations.CustomModifiers); 4595Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 4676Assert.Empty(method.ReturnTypeWithAnnotations.CustomModifiers); 4724Assert.Empty(interfaceMethod.ReturnTypeWithAnnotations.CustomModifiers); 4729Assert.Empty(classMethod.ReturnTypeWithAnnotations.CustomModifiers); 4753Assert.Empty(parentMethod.ReturnTypeWithAnnotations.CustomModifiers); 4758Assert.Empty(classMethod.ReturnTypeWithAnnotations.CustomModifiers);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_Nullable.cs (1)
3762VerifyBytes(globalNamespace.GetMember<MethodSymbol>("Program.F").ReturnTypeWithAnnotations, new byte[] { 0 }, new byte[] { }, "void");
Semantics\RecordTests.cs (2)
12518var returnType = method.ReturnTypeWithAnnotations; 12519Assert.True(method.OverriddenMethod.ReturnTypeWithAnnotations.Equals(returnType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (48)
Semantics\BindingAsyncTasklikeMoreTests.cs (6)
436Assert.Equal("C.MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 440Assert.Equal("C.MyTask<int>", method.ReturnTypeWithAnnotations.ToDisplayString()); 515Assert.Equal("MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 519Assert.Equal("MyTask<int>", method.ReturnTypeWithAnnotations.ToDisplayString()); 592Assert.Equal("MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 596Assert.Equal("MyTask<T>", method.ReturnTypeWithAnnotations.ToDisplayString());
Semantics\InitOnlyMemberTests.cs (5)
1462Assert.Empty(property.GetMethod.ReturnTypeWithAnnotations.CustomModifiers); 1479var modifier = property.SetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single(); 4769var modifier = ((SourcePropertySymbol)comp.GlobalNamespace.GetMember("C.Property")).SetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single(); 4822var modifier = ((SourcePropertySymbol)comp.GlobalNamespace.GetMember("C.Property")).SetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single(); 4834var modifier = ((SourcePropertySymbol)comp.GlobalNamespace.GetMember("C.Property")).SetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single();
Semantics\NativeIntegerTests.cs (2)
568verifyTypes(method.ReturnTypeWithAnnotations, underlyingMethod.ReturnTypeWithAnnotations);
Semantics\NullableReferenceTypesTests.cs (35)
8945Assert.Equal(NullableAnnotation.Oblivious, method.ReturnTypeWithAnnotations.NullableAnnotation); 8995verifyTuple(method.ReturnTypeWithAnnotations); 9054Assert.Equal(NullableAnnotation.Oblivious, method.ReturnTypeWithAnnotations.NullableAnnotation); 11205var type = method.ReturnTypeWithAnnotations; 11308var type = method.ReturnTypeWithAnnotations; 12432Assert.Equal(expectMatch, member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12903Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13055Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13146Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13212Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 13331Assert.False(implementing.ReturnTypeWithAnnotations.Equals(implemented.ReturnTypeWithAnnotations, 13339Assert.True(implementing.ReturnTypeWithAnnotations.Equals(implemented.ReturnTypeWithAnnotations, 13418Assert.False(implementing.ReturnTypeWithAnnotations.Equals(implemented.ReturnTypeWithAnnotations, 13858Assert.Equal("C<System.String? modopt(System.Runtime.CompilerServices.IsConst), System.String>", m1.OverriddenMethod.ReturnTypeWithAnnotations.ToTestDisplayString()); 13859Assert.Equal("C<System.String modopt(System.Runtime.CompilerServices.IsConst), System.String?>", m1.ReturnTypeWithAnnotations.ToTestDisplayString()); 13909Assert.Equal(NullableAnnotation.Annotated, m2.ReturnTypeWithAnnotations.NullableAnnotation); 14032Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14037Assert.True(m3.ReturnTypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 16654Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16739Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16824Assert.True(property.TypeWithAnnotations.Equals(property.GetMethod.ReturnTypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 17806Assert.False(implementing.ReturnTypeWithAnnotations.Equals(implemented.ReturnTypeWithAnnotations, 17814Assert.True(implementing.ReturnTypeWithAnnotations.Equals(implemented.ReturnTypeWithAnnotations, 139649Assert.Equal(NullableAnnotation.Annotated, c2Goo.ReturnTypeWithAnnotations.NullableAnnotation); 139805Assert.Equal(NullableAnnotation.Annotated, dGoo.ReturnTypeWithAnnotations.NullableAnnotation); 139880Assert.Equal(NullableAnnotation.Annotated, dGoo.ReturnTypeWithAnnotations.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (34)
DeclarationTests.cs (2)
422var returnType = method.ReturnTypeWithAnnotations; 465var returnType = method.ReturnTypeWithAnnotations;
SymbolDisplay\SymbolDisplayTests.cs (1)
6543var type = method.GetSymbol<MethodSymbol>().ReturnTypeWithAnnotations;
Symbols\AnonymousTypesSymbolTests.cs (1)
1134Assert.Equal(retType, method.ReturnTypeWithAnnotations.ToDisplayString());
Symbols\CustomModifiersTests.cs (1)
1235Assert.True(test.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.SetMethod.Parameters.First().TypeWithAnnotations.CustomModifiers));
Symbols\InterfaceImplementationTests.cs (1)
1863var returnType = derived.GetMember<MethodSymbol>(WellKnownMemberNames.DestructorName).ReturnTypeWithAnnotations;
Symbols\Metadata\PE\LoadCustomModifiers.cs (5)
56Assert.Equal(0, m1.ReturnTypeWithAnnotations.CustomModifiers.Length); 80Assert.Equal(1, m5.ReturnTypeWithAnnotations.CustomModifiers.Length); 82var m5Mod = m5.ReturnTypeWithAnnotations.CustomModifiers[0]; 111Assert.Equal(1, m7.ReturnTypeWithAnnotations.CustomModifiers.Length); 113var m7Mod = m7.ReturnTypeWithAnnotations.CustomModifiers[0];
Symbols\Metadata\PE\LoadingIndexers.cs (1)
732Assert.NotEqual(returnTypeModoptIndexer.TypeWithAnnotations.CustomModifiers.Length, returnTypeModoptIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Length);
Symbols\Metadata\PE\LoadingMethods.cs (1)
1352Assert.False(method.ReturnTypeWithAnnotations.IsDefault);
Symbols\Metadata\PE\NoPia.cs (1)
1256Assert.Equal("System.Collections.Generic.List<I1>", varI7_Bar.ReturnTypeWithAnnotations.ToTestDisplayString());
Symbols\Retargeting\RetargetCustomModifiers.cs (6)
68Assert.Equal(0, m1.ReturnTypeWithAnnotations.CustomModifiers.Length); 88Assert.Equal(1, m5.ReturnTypeWithAnnotations.CustomModifiers.Length); 90var m5Mod = m5.ReturnTypeWithAnnotations.CustomModifiers[0]; 122Assert.Equal(1, m7.ReturnTypeWithAnnotations.CustomModifiers.Length); 124var m7Mod = m7.ReturnTypeWithAnnotations.CustomModifiers[0]; 194Assert.Equal(0, m1.ReturnTypeWithAnnotations.CustomModifiers.Length);
Symbols\Retargeting\RetargetingTests.cs (2)
1236CheckSymbols(a.ReturnTypeWithAnnotations, b.ReturnTypeWithAnnotations, false);
Symbols\Source\CustomModifierCopyTests.cs (9)
451CheckCustomModifier(onReturnType, method.ReturnTypeWithAnnotations.CustomModifiers); 1792Assert.Equal(int8Type, baseProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1793Assert.Equal(int8Type, derivedProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1798Assert.Equal(int8Type, baseIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 1799Assert.Equal(int8Type, derivedIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2006Assert.Equal(int8Type, interfaceProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2007Assert.Equal(int8Type, implementationProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2012Assert.Equal(int8Type, interfaceIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); 2013Assert.Equal(int8Type, implementationIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier());
Symbols\StaticAbstractMembersInInterfacesTests.cs (3)
27720Assert.Equal("System.Void", c3M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString()); 27789Assert.Equal("System.Void", c4M02Add.ReturnTypeWithAnnotations.ToTestDisplayString()); 27802Assert.Equal("System.Void", c4M02Remove.ReturnTypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
55AddIfUsesIsNullable(symbol, symbol.ReturnTypeWithAnnotations, inProgress: null) ||