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)
4071if ((object)bestType == null || bestType.IsVoidType()) // Dev10 also reports ERR_ImplicitlyTypedArrayNoBestType for void. 4098if ((object)bestType == null || bestType.IsVoidType()) 4785Debug.Assert(constructorReturnType.IsVoidType()); //true of all constructors 7626if ((object)leftType != null && leftType.IsVoidType()) 9550if (pointedAtType.IsVoidType()) 10817bool returnsVoid = returnType.Type.IsVoidType(); 11023if (accessType.IsValueType && !accessType.IsNullableType() && !accessType.IsVoidType()) 11134if (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(); 2496if (pointedAtType.IsVoidType()) 3290operand.Type.IsVoidType()) 3889operandType.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()) 2311if (targetType.IsVoidType()) 3051if (retType.IsVoidType() || IsEffectivelyTaskReturningAsyncMethod()) 3059if (retType.IsVoidType()) 3079if (retType.IsVoidType()) 3113if ((object)arg?.Type != null && arg.Type.IsVoidType()) 3468else 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)
3234!(y = invoke.ReturnType).IsVoidType()) 3503if (!r1.IsVoidType()) 3505if (r2.IsVoidType()) 3511else if (!r2.IsVoidType()) 3622Debug.Assert((r1.IsVoidType()) == (r2.IsVoidType())); 3626Debug.Assert(!r1.IsVoidType()); 3627Debug.Assert(!r2.IsVoidType()); 3632if (r1.IsVoidType()) 3634if (r2.IsVoidType()) 3642else 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)
2167if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2192(result!.Type!.IsVoidType() || result.Type!.SpecialType == SpecialType.System_Int32); 2211if (returnType.SpecialType != SpecialType.System_Int32 && !returnType.IsVoidType())
FlowAnalysis\FlowAnalysisPass.cs (1)
82Debug.Assert(!submissionResultType.IsVoidType());
FlowAnalysis\NullableWalker.cs (1)
5839oldType.IsVoidType() || oldType.IsErrorType() ? oldType :
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
345!builderType.IsVoidType() &&
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
385BoundStatement 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)
305public 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)
1604!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();