11 references to SwitchGoverningType
Microsoft.CodeAnalysis.CSharp (11)
Binder\SwitchBinder_Patterns.cs (4)
253caseLabelSyntax.Value, caseLabelSyntax.Value, ref unionType, SwitchGoverningType, ref permitDesignations, hasErrors, diagnostics, out bool hasUnionMatching); 262var pattern = new BoundDiscardPattern(node, inputType: SwitchGoverningType, narrowedType: SwitchGoverningType); 287matchLabelSyntax.Pattern, ref unionType, SwitchGoverningType, ref permitDesignations, node.HasErrors, diagnostics, out bool hasUnionMatching, underIsPattern: false);
Binder\SwitchBinder.cs (7)
229matchLabel.Pattern, ref unionType, SwitchGoverningType, ref permitDesignations, labelSyntax.HasErrors, tempDiagnosticBag, hasUnionMatching: out _, underIsPattern: false); 259Conversion conversion = Conversions.ClassifyConversionFromExpression(caseExpression, SwitchGoverningType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo); 263GenerateImplicitConversionError(diagnostics, node, conversion, caseExpression, SwitchGoverningType); 268diagnostics.Add(ErrorCode.WRN_GotoCaseShouldConvert, node.Location, SwitchGoverningType); 272if (!conversion.IsUnion && !(caseExpression.IsLiteralNull() && SwitchGoverningType.StrippedType() is NamedTypeSymbol { IsUnionType: true })) 274caseExpression = CreateConversion(caseExpression, conversion, SwitchGoverningType, diagnostics); 278var inputType = SwitchGoverningType;