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