243 references to ReturnType
Microsoft.CodeAnalysis.CSharp (243)
Binder\Binder.ValueChecks.cs (3)
53Method is { RefKind: not RefKind.None, ReturnType: { } returnType } && 2511return method.ReturnType.IsRefLikeOrAllowsRefLikeType(); 4544Debug.Assert(constructMethod.ReturnType.Equals(expr.Type, TypeCompareKind.AllIgnoreOptions));
Binder\Binder_Await.cs (2)
40TypeSymbol awaitExpressionType = info.GetResult?.ReturnType ?? (hasErrors ? CreateErrorType() : Compilation.DynamicType); 186new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncMethod, method.ReturnType);
Binder\Binder_Conversions.cs (10)
591readonlySpanType.Equals(method.ReturnType.OriginalDefinition, TypeCompareKind.ConsiderEverything)); 642arg.destination.Equals(method.ReturnType.OriginalDefinition, TypeCompareKind.ConsiderEverything) && 648((NamedTypeSymbol)method.ReturnType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type.Equals(((NamedTypeSymbol)arg.destination).TypeParameters[0], TypeCompareKind.ConsiderEverything)); 671method.ReturnType.Equals(readOnlySpanType, TypeCompareKind.ConsiderEverything)) 864collectionBuilderInvocationPlaceholder = new BoundValuePlaceholder(syntax, collectionBuilderMethod.ReturnType) { WasCompilerGenerated = true }; 1901conversion = Conversions.ClassifyImplicitConversionFromType(methodWithTargetTypeParameters.ReturnType, targetType.OriginalDefinition, ref candidateUseSiteInfo); 2887var methodReturnType = method.ReturnType; 2888var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 2905Error(diagnostics, ErrorCode.ERR_BadRetType, errorLocation, method, method.ReturnType); 3025if ((selectedMethod.HasParameterContainingPointerType() || selectedMethod.ReturnType.ContainsPointer())
Binder\Binder_Crefs.cs (2)
303symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 562if (ContainsNestedTypeOfUnconstructedGenericType(signature.ReturnType))
Binder\Binder_Deconstruct.cs (1)
693if (deconstructMethod.ReturnType.GetSpecialTypeSafe() != SpecialType.System_Void)
Binder\Binder_Expressions.cs (2)
4787TypeSymbol constructorReturnType = constructor.ReturnType; 10198getMethod.ReturnType.SpecialType == SpecialType.System_Int32 &&
Binder\Binder_InterpolatedString.cs (1)
983if (call is BoundCall { Method: { ReturnType: var returnType } method })
Binder\Binder_Invocation.cs (3)
1185var returnType = methodResult.Member.ReturnType; 2384funcPtr.Signature.ReturnType, 2403funcPtr.Signature.ReturnType,
Binder\Binder_Operators.cs (2)
326type = method.ReturnType; 1161SourceUserDefinedOperatorSymbol.IsSelfConstrainedTypeParameter((definition = signature.Method.OriginalDefinition).ReturnType.StrippedType(), definition.ContainingType));
Binder\Binder_Statements.cs (6)
1299elementType = fixedPatternMethod.ReturnType; 2973TypeSymbol returnType = symbol.ReturnType; 3387lambda.MessageID.Localize(), lambda.ReturnType); 3523var inferringLambda = this.ContainingMemberOrLambda is MethodSymbol method && (object)method.ReturnType == LambdaSymbol.ReturnTypeIsBeingInferred; 3969type: baseConstructor.ReturnType, 4013type: baseConstructor.ReturnType,
Binder\ExecutableCodeBinder.cs (1)
135var returnType = iterator.ReturnType;
Binder\ForEachLoopBinder.cs (13)
255var placeholder = new BoundAwaitableValuePlaceholder(expr, builder.MoveNextInfo?.Method.ReturnType ?? CreateErrorType()); 258if (!hasErrors && awaitInfo.GetResult?.ReturnType.SpecialType != SpecialType.System_Boolean) 524Conversion currentConversionClassification = this.Conversions.ClassifyConversionFromType(builder.CurrentPropertyGetter.ReturnType, builder.ElementType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo); 526TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType; 556builder.CurrentPlaceholder = new BoundValuePlaceholder(_syntax, builder.CurrentPropertyGetter.ReturnType).MakeCompilerGenerated(); 597: builder.PatternDisposeInfo.Method.ReturnType; 1037diagnostics.Add(isAsync ? ErrorCode.ERR_BadGetAsyncEnumerator : ErrorCode.ERR_BadGetEnumerator, collectionSyntax.Location, getEnumeratorMethod.ReturnType, getEnumeratorMethod); 1107TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType; 1166builder.GetEnumeratorInfo.Method.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator); 1192TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType; 1305TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1597TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1707return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean;
Binder\InMethodBinder.cs (1)
128TypeSymbol returnType = _methodSymbol.ReturnType;
Binder\LockBinder.cs (1)
86var scopeType = enterScopeMethod.ReturnType;
Binder\Semantics\AccessCheck.cs (1)
168if (!IsSymbolAccessibleCore(funcPtr.Signature.ReturnType, within, throughTypeOpt: null, out failedThroughTypeCheck, compilation, ref useSiteInfo, basesBeingResolved))
Binder\Semantics\Conversions\Conversions.cs (2)
258returnRefKind: delegateInvokeMethodOpt.RefKind, returnType: delegateInvokeMethodOpt.ReturnType, 394returnType: delegateInvokeMethod.ReturnType);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1488!invokeMethod.ReturnType.Equals(returnType.Type, TypeCompareKind.AllIgnoreOptions))
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (2)
267if (op.ReturnsVoid || op.ParameterCount != 1 || op.ReturnType.TypeKind == TypeKind.Error) 273TypeSymbol convertsTo = op.ReturnType;
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
301TypeSymbol convertsTo = op.ReturnType; 420if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2))
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (2)
974TypeSymbol resultType = op.ReturnType; 989TypeSymbol resultType = op.ReturnType;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
529TypeSymbol resultType = op.ReturnType; 558TypeSymbol resultType = op.ReturnType;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
1069var returnType = method.ReturnType; 2431if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None) 2781if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (9)
860if (returnType is null || method.ReturnType.Equals(returnType, TypeCompareKind.AllIgnoreOptions)) 866returnsMatch = Conversions.HasIdentityOrImplicitReferenceConversion(method.ReturnType, returnType, ref useSiteInfo); 869returnsMatch = ConversionsBase.HasImplicitPointerToVoidConversion(method.ReturnType, returnType) 870|| Conversions.HasImplicitPointerConversion(method.ReturnType, returnType, ref useSiteInfo); 3255!(y = invoke.ReturnType).IsVoidType()) 3520TypeSymbol r1 = invoke1.ReturnType; 3521TypeSymbol r2 = invoke2.ReturnType; 3637TypeSymbol r1 = invoke1.ReturnType; 3638TypeSymbol r2 = invoke2.ReturnType;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
711diagnostics.Add(ErrorCode.ERR_BadRetType, location, method, method.ReturnType);
Binder\UsingStatementBinder.cs (1)
228awaitableType = disposeMethod.ReturnType;
Binder\WithLambdaParametersBinder.cs (1)
50return lambdaSymbol.ReturnType;
BoundTree\Constructors.cs (2)
154type: method.ReturnType, 225type: method.ReturnType,
BoundTree\UnboundLambda.cs (3)
304var delegateReturnType = delegateType?.GetDelegateType()?.DelegateInvokeMethod?.ReturnType as NamedTypeSymbol; 802(object)LambdaSymbol.InferenceFailureReturnType != lambdaSymbol.ReturnType && 1121var delegateReturnType = invoke.ReturnType as NamedTypeSymbol;
CodeGen\CodeGenerator.cs (1)
193result = AllocateTemp(_method.ReturnType, _boundBody.Syntax, slotConstraints);
CodeGen\EmitExpression.cs (3)
3693if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2)) 3720if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2)) 4090EmitLoadIndirect(method.ReturnType, syntax);
Compilation\CSharpCompilation.cs (4)
2172if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2177if (!(method.ReturnType is NamedTypeSymbol namedType)) 2214TypeSymbol returnType = method.ReturnType;
Compiler\ClsComplianceChecker.cs (1)
734type = method.ReturnType;
Compiler\MethodCompiler.cs (1)
240var returnType = entryPoint.ReturnType;
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
119s_parameterOrReturnTypeInstance.Visit(symbol.ReturnType, builder);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (4)
390var otherReturnType = (TypeSymbol?)Visit(sig.ReturnType); 601return _comparer.Equals(method.ReturnType, other.ReturnType) && 912var translatedReturnType = (TypeSymbol)Visit(sig.ReturnType);
Emitter\Model\MethodReference.cs (1)
111return ((PEModuleBuilder)context.Module).Translate(UnderlyingMethod.ReturnType, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics);
Emitter\Model\MethodSymbolAdapter.cs (1)
242return ((PEModuleBuilder)context.Module).Translate(AdaptedMethodSymbol.ReturnType,
FlowAnalysis\NullableWalker.cs (7)
3676invokeMethod.ReturnType.Equals(l.ReturnType, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreTupleNames); 6375|| method.ReturnType.SpecialType != SpecialType.System_Boolean 7219if (method.ReturnType.SpecialType == SpecialType.System_Boolean 11091var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, enumeratorInfoOpt.MoveNextInfo.Method); 11107var disposeAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, originalDisposeMethod); 12057method.ReturnType, errorLocation: null, diagnostics: null);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
184var returnType = (NamedTypeSymbol)method.ReturnType; 255var returnType = (NamedTypeSymbol)method.ReturnType; 489method.ReturnType.Equals(builderType, TypeCompareKind.AllIgnoreOptions))
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (3)
312var moveNextAsyncReturnType = (NamedTypeSymbol)IAsyncEnumerableOfElementType_MoveNextAsync.ReturnType; 431TypeSymbol returnType = IAsyncDisposable_DisposeAsync.ReturnType; 453.AsMember((NamedTypeSymbol)IAsyncDisposable_DisposeAsync.ReturnType);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (4)
573_bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)), 706var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ? 707_nullableType.Construct(method.ReturnType) : method.ReturnType;
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
131if (ReturnType.ContainsNativeIntegerWrapperType())
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
68switch (method.ReturnType.OriginalDefinition.SpecialType) 81throw ExceptionUtilities.UnexpectedValue(method.ReturnType.OriginalDefinition.SpecialType);
Lowering\LocalRewriter\LocalRewriter.cs (1)
675Debug.Assert(TypeSymbol.Equals(type, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
244TypeSymbol type = e.Property.GetMethod.ReturnType;
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
369setMethod.ReturnType);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (3)
785Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2)); 2030? new BoundBinaryOperator(syntax, operatorKind, null, method, constrainedToTypeOpt: null, default(LookupResultKind), loweredLeft, loweredRight, method.ReturnType) 2032BoundExpression result = method.ReturnType.SpecialType == SpecialType.System_Delegate ?
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
469method.ReturnType); 487type: method.ReturnType); 504method.ReturnType); 1449type: arrayEmpty.ReturnType);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
201if (getEnumeratorMethod?.ReturnType.IsValueType == true) 227(!builder.ReturnType.IsRefLikeType || builder.Parameters[0].EffectiveScope == ScopedKind.ScopedValue)) 507type: constructMethod.ReturnType);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (7)
663if (Binder.TryFindCastUpMethod(implicitOperator.ReturnType.OriginalDefinition, destinationType.OriginalDefinition) is not { } castUpMethodDefinition) 893TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 1381if (call.Method.ReturnType.IsValidNullableTypeArgument()) 1383Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1744Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1768Conversion toConversion = TryMakeConversion(syntax, conversion.UserDefinedToConversion, meth.ReturnType, toType, @checked: @checked); 1874Conversion toConversion = TryMakeConversion(syntax, meth.ReturnType, toType, @checked: @checked);
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
58Debug.Assert(method.ReturnType.Equals(node.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
321getPinnableMethod.ReturnType,
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (3)
154TypeSymbol enumeratorType = getEnumeratorInfo.Method.ReturnType; 234rewrittenCondition = RewriteAwaitExpression(forEachSyntax, rewrittenCondition, awaitableInfo, awaitableInfo.GetResult.ReturnType, debugInfo, used: true); 477TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
244getItemOrSliceHelper = getItemOrSliceHelper.AsMember((NamedTypeSymbol)createSpan.ReturnType); 393getItemOrSliceHelper = getItemOrSliceHelper.AsMember((NamedTypeSymbol)createSpan.ReturnType);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
572BoundExpression binary = MakeBinaryOperator(_factory.Syntax, single.Kind, left, right, single.MethodSymbolOpt?.ReturnType ?? boolType, single.MethodSymbolOpt, single.ConstrainedToTypeOpt);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
113Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2)); 644Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
480TypeSymbol awaitExpressionType = awaitOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
Lowering\SyntheticBoundNodeFactory.cs (7)
556var conversion = Compilation.Conversions.ClassifyConversionFromType(expression.Type, CurrentFunction.ReturnType, isChecked: false, ref useSiteInfo); 562expression = BoundConversion.Synthesized(Syntax, expression, conversion, false, explicitCastInCode: false, conversionGroupOpt: null, ConstantValue.NotAvailable, CurrentFunction.ReturnType); 855type: method.ReturnType, hasErrors: method.OriginalDefinition is ErrorMethodSymbol) 890argsToParamsOpt: ImmutableArray<int>.Empty, defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, type: method.ReturnType) 1264Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1308Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo)); 1415Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
Operations\CSharpOperationFactory.cs (1)
1911HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorInfoOpt.GetEnumeratorInfo.Method.ReturnType,
Symbols\Compilation_WellKnownMembers.cs (1)
1153return method.ReturnType;
Symbols\ConversionSignatureComparer.cs (3)
51return member1.ReturnType.Equals(member2.ReturnType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) 64hash = Hash.Combine(member.ReturnType.GetHashCode(), hash);
Symbols\ErrorMethodSymbol.cs (1)
170get { return this.ReturnType.IsVoidType(); }
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
761=> Hash.Combine(ReturnType, Hash.Combine(((int)CallingConvention).GetHashCode(), ((int)FunctionPointerTypeSymbol.GetRefKindForHashCode(RefKind)).GetHashCode())); 802return ReturnType.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes)
Symbols\MemberSymbolExtensions.cs (1)
581return method.ReturnType.ContainsTupleNames() || method.Parameters.Any(static p => p.Type.ContainsTupleNames());
Symbols\Metadata\PE\PEEventSymbol.cs (1)
202TypeSymbol.Equals(_addMethod.ReturnType, token, TypeCompareKind.ConsiderEverything2) &&
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
632public override bool ReturnsVoid => this.ReturnType.IsVoidType();
Symbols\MethodSymbol.cs (2)
455(requireSameReturnType && !this.ReturnType.Equals(overridden.ReturnType, TypeCompareKind.AllIgnoreOptions)))
Symbols\MethodSymbolExtensions.cs (6)
160&& method.ReturnType is NamedTypeSymbol { Arity: 0 } 161&& (method.HasAsyncMethodBuilderAttribute(builderArgument: out _) || method.ReturnType.IsNonGenericTaskType(compilation)); 170&& method.ReturnType is NamedTypeSymbol { Arity: 1 } 171&& (method.HasAsyncMethodBuilderAttribute(builderArgument: out _) || method.ReturnType.IsGenericTaskType(compilation)); 180&& method.ReturnType.IsIAsyncEnumerableType(compilation); 189&& method.ReturnType.IsIAsyncEnumeratorType(compilation);
Symbols\OverriddenOrHiddenMembersHelpers.cs (2)
955if (!method.ReturnType.Equals(csharpOverriddenMethod.ReturnType, TypeCompareKind.AllIgnoreOptions))
Symbols\Source\LambdaSymbol.cs (3)
142get { return this.ReturnTypeWithAnnotations.HasType && this.ReturnType.IsVoidType(); } 399&& TypeSymbol.Equals(lambda.ReturnType, this.ReturnType, compareKind)
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
29TypeWithAnnotations elementType = InMethodBinder.GetIteratorElementTypeFromReturnType(DeclaringCompilation, RefKind, ReturnType, errorLocation: null, diagnostics: null);
Symbols\Source\LocalFunctionSymbol.cs (1)
306public override bool ReturnsVoid => ReturnType.IsVoidType();
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1236method.ReturnType.OriginalDefinition.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T)))
Symbols\Source\SourceDelegateMethodSymbol.cs (4)
104diagnostics.Add(ErrorCode.ERR_BadVisDelegateReturn, delegateType.GetFirstLocation(), delegateType, invoke.ReturnType); 108if (!delegateTypeIsFile && invoke.ReturnType.HasFileLocalTypes()) 110diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, delegateType.GetFirstLocation(), invoke.ReturnType, delegateType); 327if (compilation.ShouldEmitNativeIntegerAttributes(ReturnType))
Symbols\Source\SourceMemberContainerSymbol.cs (12)
2574if (!op1.ReturnType.Equals(op2.ReturnType, TypeCompareKind.AllIgnoreOptions)) 4330if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 4332diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, deconstruct.GetFirstLocation(), deconstruct, targetMethod.ReturnType); 4434if (!printMembersMethod.ReturnType.Equals(targetMethod.ReturnType, TypeCompareKind.AllIgnoreOptions)) 4436if (!printMembersMethod.ReturnType.IsErrorType()) 4438diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, printMembersMethod.GetFirstLocation(), printMembersMethod, targetMethod.ReturnType); 4757if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType()) 4759diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, thisEquals.GetFirstLocation(), thisEquals, targetMethod.ReturnType);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (4)
994if (!IsOrContainsErrorType(overridingMethod.ReturnType)) 1002diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportCovariantReturnsOfClasses, overridingMemberLocation, overridingMember, overriddenMember, overriddenMethod.ReturnType); 1016diagnostics.Add(ErrorCode.ERR_CantChangeReturnTypeOnOverride, overridingMemberLocation, overridingMember, overriddenMember, overriddenMethod.ReturnType); 1390if (method.ReturnType.IsRefLikeOrAllowsRefLikeType() ||
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
1399checkAndReportManagedTypes(ReturnType, this.RefKind, returnTypeSyntax, isParam: false, diagnostics); 1584if (ReturnType.OriginalDefinition.Equals(iAsyncEnumerableType) && 1607var returnType = methodSymbol.ReturnType;
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1872TypeSymbol returnType = conversion.ReturnType;
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
233this.ReturnType.CheckAllConstraints(compilation, conversions, this.GetFirstLocation(), diagnostics); 250if (compilation.ShouldEmitNativeIntegerAttributes(ReturnType))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
842else if (ReturnType.IsStatic) 845diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(ContainingType.IsInterfaceType()), location, ReturnType);
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
322get { return this.ReturnType.IsVoidType(); }
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (5)
444var target = this.ReturnType; 617if (this.ReturnType.SpecialType != SpecialType.System_Boolean) 679this.ReturnType.Equals(parameterType, ComparisonForUserDefinedOperators) : 680(((IsAbstract || IsVirtual) && IsContainingType(parameterType) && IsSelfConstrainedTypeParameter(this.ReturnType)) || 681this.ReturnType.EffectiveTypeNoUseSiteDiagnostics.IsEqualToOrDerivedFrom(parameterType, ComparisonForUserDefinedOperators, useSiteInfo: ref useSiteInfo))))
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
58return f.Return(f.Convert(method.ReturnType, itemFieldReference)); 89method.ReturnType));
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
536interfaceMethod.ReturnType, 696method.ReturnType));
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (2)
114if (ReturnType.IsErrorType()) 181candidate.ReturnType,
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
179F.CloseMethod(F.Block(F.Return(F.Typeof(ContainingType, ReturnType))));
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic &&
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
108baseEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
81if (overridden is null || overridden.ReturnType.SpecialType != SpecialType.System_Int32)
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (2)
48leastOverridden.ReturnType.Equals(overriding.ReturnType, TypeCompareKind.AllIgnoreOptions);
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
47if (_typedRecordEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
123if (ReturnType.IsErrorType() || 158basePrintMethod.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
155get { return ReturnType.IsVoidType(); }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (6)
142get { return ReturnType.IsVoidType(); } 307type: method.ReturnType) 370type: userMain.ReturnType) 377ReturnType.IsVoidType() || 378ReturnType.SpecialType == SpecialType.System_Int32); 489Debug.Assert(!initializer.ReturnType.IsDynamic());
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
241get { return this.ReturnType.IsVoidType(); }
Symbols\TypeSymbol.cs (1)
2009interfaceMemberReturnType = method.ReturnType;
Symbols\VarianceSafety.cs (1)
161method.ReturnType,