90 references to IsVoidType
Microsoft.CodeAnalysis.CSharp (90)
Binder\Binder_AnonymousTypes.cs (1)
221if (expressionType.IsVoidType())
Binder\Binder_Await.cs (2)
87type.IsVoidType()) 326if (expression.Type.IsVoidType())
Binder\Binder_Expressions.cs (8)
4074if ((object)bestType == null || bestType.IsVoidType()) // Dev10 also reports ERR_ImplicitlyTypedArrayNoBestType for void. 4101if ((object)bestType == null || bestType.IsVoidType()) 4788Debug.Assert(constructorReturnType.IsVoidType()); //true of all constructors 7627if ((object)leftType != null && leftType.IsVoidType()) 9551if (pointedAtType.IsVoidType()) 10818bool returnsVoid = returnType.Type.IsVoidType(); 11024if (accessType.IsValueType && !accessType.IsNullableType() && !accessType.IsVoidType()) 11135if (receiverType.IsVoidType())
Binder\Binder_Initializers.cs (1)
259((object?)expression.Type == null || !expression.Type.IsVoidType()))
Binder\Binder_Invocation.cs (1)
289else if (argument.Type.IsVoidType())
Binder\Binder_Lookup.cs (1)
1992while ((object)type != null && !type.IsVoidType())
Binder\Binder_Operators.cs (4)
363return !type.IsPointerOrFunctionPointer() && !type.IsRestrictedType() && !type.IsVoidType(); 2501if (pointedAtType.IsVoidType()) 3295operand.Type.IsVoidType()) 3894operandType.IsVoidType())
Binder\Binder_Patterns.cs (1)
25if (expressionType is null || expressionType.IsVoidType())
Binder\Binder_Query.cs (2)
738else if (!yExpression.HasAnyErrors && yExpression.Type!.IsVoidType()) 990else if (receiver.Type!.IsVoidType())
Binder\Binder_Statements.cs (8)
1322if (initializer.Type.IsVoidType()) 1465if (inferredType.IsVoidType()) 2314if (targetType.IsVoidType()) 3054if (retType.IsVoidType() || IsEffectivelyTaskReturningAsyncMethod()) 3062if (retType.IsVoidType()) 3082if (retType.IsVoidType()) 3116if ((object)arg?.Type != null && arg.Type.IsVoidType()) 3471else if (returnType.IsVoidType() || IsEffectivelyTaskReturningAsyncMethod())
Binder\Binder_WithExpression.cs (1)
23if (receiverType is null || receiverType.IsVoidType())
Binder\Semantics\Conversions\ConversionsBase.cs (4)
768if (source.IsVoidType() || destination.IsVoidType()) 798if (source.IsVoidType() || destination.IsVoidType())
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
3288!type.IsVoidType();
Binder\Semantics\OverloadResolution\OverloadResolution.cs (11)
3255!(y = invoke.ReturnType).IsVoidType()) 3524if (!r1.IsVoidType()) 3526if (r2.IsVoidType()) 3532else if (!r2.IsVoidType()) 3643Debug.Assert((r1.IsVoidType()) == (r2.IsVoidType())); 3647Debug.Assert(!r1.IsVoidType()); 3648Debug.Assert(!r2.IsVoidType()); 3653if (r1.IsVoidType()) 3655if (r2.IsVoidType()) 3663else if (r2.IsVoidType())
Binder\SwitchBinder.cs (2)
423else if (!switchGoverningType.IsVoidType()) 442Debug.Assert((object)switchGoverningExpression.Type == null || switchGoverningExpression.Type.IsVoidType());
Binder\SwitchExpressionBinder.cs (1)
200if (switchGoverningExpression.Type == (object?)null || switchGoverningExpression.Type.IsVoidType())
BoundTree\UnboundLambda.cs (2)
305if (delegateReturnType?.IsVoidType() == false) 1122if (delegateReturnType?.IsVoidType() == false)
CodeGen\EmitStatement.cs (1)
1798translatedType = pointedAtType.IsVoidType()
Compilation\CSharpCompilation.cs (3)
2172if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2197(result!.Type!.IsVoidType() || result.Type!.SpecialType == SpecialType.System_Int32); 2216if (returnType.SpecialType != SpecialType.System_Int32 && !returnType.IsVoidType())
FlowAnalysis\FlowAnalysisPass.cs (1)
82Debug.Assert(!submissionResultType.IsVoidType());
FlowAnalysis\NullableWalker.cs (1)
5900oldType.IsVoidType() || oldType.IsErrorType() ? oldType :
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
345!builderType.IsVoidType() &&
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
394BoundStatement getResultStatement = resultPlace != null && !type.IsVoidType() ?
Lowering\InitializerRewriter.cs (2)
53!expression.Type.IsVoidType()) 65Debug.Assert(!submissionResultType.IsVoidType());
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (2)
128if (accessExpressionType.IsVoidType()) 141(nodeType.IsVoidType() && !used));
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (2)
735bool returnsVoid = resultType.IsVoidType(); 899var result = new TypeSymbol[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0) + (resultType.IsVoidType() ? 0 : 1)];
Lowering\SpillSequenceSpiller.cs (3)
497if (expression.Type.IsVoidType() || sideEffectsOnly) 1124if (node.Type.IsVoidType()) 1323if (node.Type.IsVoidType())
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
200bool returnsVoid = fields[^1].Type.IsVoidType(); 312return returnParameter.Type.IsVoidType() || isValidTypeArgument(useUpdatedEscapeRules, runtimeSupportsByRefLikeGenerics, returnParameter, ref needsIndexedName);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (2)
109returnsVoid: typeDescr.Fields[^1].Type.IsVoidType(), 123var returnsVoid = returnParameter.Type.IsVoidType();
Symbols\ErrorMethodSymbol.cs (1)
170get { return this.ReturnType.IsVoidType(); }
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
632public override bool ReturnsVoid => this.ReturnType.IsVoidType();
Symbols\MethodSymbol.cs (1)
757if (!this.IsExtensionMethod || this.MethodKind == MethodKind.ReducedExtension || receiverType.IsVoidType())
Symbols\Source\LambdaSymbol.cs (1)
142get { return this.ReturnTypeWithAnnotations.HasType && this.ReturnType.IsVoidType(); }
Symbols\Source\LocalFunctionSymbol.cs (1)
306public override bool ReturnsVoid => ReturnType.IsVoidType();
Symbols\Source\SourceEventSymbol.cs (1)
587else if (this.Type.IsVoidType())
Symbols\Source\SourceMemberFieldSymbol.cs (1)
58else if (type.IsVoidType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1610!returnType.IsVoidType() &&
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
322get { return this.ReturnType.IsVoidType(); }
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
155get { return ReturnType.IsVoidType(); }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
142get { return ReturnType.IsVoidType(); } 377ReturnType.IsVoidType() ||
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
241get { return this.ReturnType.IsVoidType(); }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
141get { return _returnType.IsVoidType(); }
Symbols\TypeSymbolExtensions.cs (2)
1551return type is PointerTypeSymbol p && p.PointedAtType.IsVoidType(); 1839if (namedType.IsVoidType())
Symbols\TypeWithAnnotations.cs (2)
900internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType(); 973internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType();