10 references to SwitchGoverningType
Microsoft.CodeAnalysis.CSharp (10)
Binder\SwitchBinder.cs (6)
227matchLabel.Pattern, SwitchGoverningType, permitDesignations: true, labelSyntax.HasErrors, tempDiagnosticBag); 257Conversion conversion = Conversions.ClassifyConversionFromExpression(caseExpression, SwitchGoverningType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo); 261GenerateImplicitConversionError(diagnostics, node, conversion, caseExpression, SwitchGoverningType); 266diagnostics.Add(ErrorCode.WRN_GotoCaseShouldConvert, node.Location, SwitchGoverningType); 270caseExpression = CreateConversion(caseExpression, conversion, SwitchGoverningType, diagnostics); 273return ConvertPatternExpression(SwitchGoverningType, node, caseExpression, out constantValueOpt, hasErrors, diagnostics, out _);
Binder\SwitchBinder_Patterns.cs (4)
241caseLabelSyntax.Value, caseLabelSyntax.Value, SwitchGoverningType, hasErrors, diagnostics); 250var pattern = new BoundDiscardPattern(node, inputType: SwitchGoverningType, narrowedType: SwitchGoverningType); 273matchLabelSyntax.Pattern, SwitchGoverningType, permitDesignations: true, node.HasErrors, diagnostics);