10 references to SwitchGoverningType
Microsoft.CodeAnalysis.CSharp (10)
Binder\SwitchBinder.cs (6)
223matchLabel.Pattern, SwitchGoverningType, permitDesignations: true, labelSyntax.HasErrors, tempDiagnosticBag); 253Conversion conversion = Conversions.ClassifyConversionFromExpression(caseExpression, SwitchGoverningType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo); 257GenerateImplicitConversionError(diagnostics, node, conversion, caseExpression, SwitchGoverningType); 262diagnostics.Add(ErrorCode.WRN_GotoCaseShouldConvert, node.Location, SwitchGoverningType); 266caseExpression = CreateConversion(caseExpression, conversion, SwitchGoverningType, diagnostics); 269return 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);