133 references to IsImplicit
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
528return conversion.IsReference && conversion.IsImplicit;
Microsoft.CodeAnalysis.CSharp (57)
Binder\Binder_Await.cs (1)
417if (!conversion.IsImplicit)
Binder\Binder_Deconstruct.cs (1)
326if (!nestedConversion.IsImplicit)
Binder\Binder_Expressions.cs (4)
1224if (!conversion.IsImplicit || !conversion.IsValid) 1273if (!conversion.IsImplicit || !conversion.IsValid) 5348if (!conversion.IsImplicit || !conversion.IsValid) 5360hasErrors = !conversion.IsImplicit;
Binder\Binder_Operators.cs (4)
224if (!rightToLeftConversion.IsImplicit || !rightToLeftConversion.IsValid) 272if (!argumentConversion.IsImplicit || !argumentConversion.IsValid) // NOTE: dev10 appears to allow user-defined conversions here. 821Debug.Assert(!conversion.IsImplicit); 1280if (conversion.IsImplicit)
Binder\Binder_Patterns.cs (2)
632if (Compilation.LanguageVersion < requiredVersion && !patternExpressionConversion.IsImplicit) 1287var result = Compilation.Conversions.ClassifyBuiltInConversion(type, possibleBaseInterface, isChecked: CheckOverflowAtRuntime, ref useSiteInfo).IsImplicit;
Binder\Binder_Statements.cs (7)
1373if (!elementConversionClassification.IsValid || !elementConversionClassification.IsImplicit) 1383elementConversionClassification.IsImplicit ? diagnostics : BindingDiagnosticBag.Discarded); 1962!conversion.IsImplicit : 2234Debug.Assert(!conversion.IsImplicit || !conversion.IsValid); 2425if (!conversion.IsImplicit || !conversion.IsValid) 2675if (conversion.IsImplicit) 3174else if (!conversion.IsImplicit || !conversion.IsValid)
Binder\Binder_TupleOperators.cs (1)
135if (conversion.IsImplicit)
Binder\DecisionDagBuilder.cs (1)
464if (input.Type.IsDynamic() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit)
Binder\ForEachLoopBinder.cs (1)
568(collectionConversionClassification.IsImplicit &&
Binder\Semantics\Conversions\Conversion.cs (2)
633return Exists && !IsImplicit; 1154return new CommonConversion(Exists, IsIdentity, IsNumeric, IsReference, IsImplicit, IsNullable, methodSymbol, constrainedToType);
Binder\Semantics\Conversions\ConversionsBase.cs (4)
124if (fastConversion.IsImplicit) 184return fastConversion.IsImplicit ? fastConversion : Conversion.NoConversion; 3005if (ClassifyImplicitConversionFromType(typeToCheck, targetInterfaceType, ref useSiteInfo).IsImplicit) 3039if (ClassifyImplicitConversionFromExpression(expressionToCheck, targetInterfaceType, ref useSiteInfo).IsImplicit)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (2)
317Debug.Assert(leftConversion.Exists && leftConversion.IsImplicit); 318Debug.Assert(rightConversion.Exists && rightConversion.IsImplicit);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
731Debug.Assert(convLeft.IsImplicit); 732Debug.Assert(convRight.IsImplicit); 802if (convLeft.IsImplicit && convRight.IsImplicit)
Binder\Semantics\Operators\UnaryOperatorEasyOut.cs (1)
116Debug.Assert(conversion.HasValue && conversion.Value.IsImplicit);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
278if (conversion.IsImplicit)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
3063var t1IsConvertibleToT2 = Conversions.ClassifyImplicitConversionFromType(t1, t2, ref useSiteInfo).IsImplicit; 3064var t2IsConvertibleToT1 = Conversions.ClassifyImplicitConversionFromType(t2, t1, ref useSiteInfo).IsImplicit; 3183Conversions.ClassifyImplicitConversionFromType(source, destination, ref useSiteInfo).IsImplicit; 3459bool type1ToType2 = Conversions.ClassifyImplicitConversionFromType(type1, type2, ref useSiteInfo).IsImplicit; 3460bool type2ToType1 = Conversions.ClassifyImplicitConversionFromType(type2, type1, ref useSiteInfo).IsImplicit; 4613Debug.Assert((!conversion.Exists) || conversion.IsImplicit, "ClassifyImplicitConversion should only return implicit conversions");
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1307Debug.Assert(!badArg.Result.ConversionForArg(parm).IsImplicit);
Binder\SwitchBinder.cs (1)
264else if (!conversion.IsImplicit)
FlowAnalysis\NullableWalker.cs (2)
10984else if (conversion.IsImplicit) 11196fromExplicitCast: !conversion.IsImplicit,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
624ref discardedUseSiteInfo).IsImplicit;
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
79if (conversion.IsImplicit)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
740if (conversion.IsImplicit)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (5)
1783var resultConversion = new Conversion(result, conversion.IsImplicit); 1798return TryMakeUserDefinedConversion(syntax, method, fromType, toType, @checked: @checked, conversion.IsImplicit); 1812return TryMakeUserDefinedConversion(syntax, method, fromType, toType, @checked: @checked, conversion.IsImplicit); 1829return TryMakeUserDefinedConversion(syntax, method, fromType, toType, @checked: @checked, conversion.IsImplicit); 1842return TryMakeUserDefinedConversion(syntax, method, fromType, toType, @checked: @checked, conversion.IsImplicit);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
500Debug.Assert(receiverConversion.IsImplicit && !receiverConversion.IsUserDefined);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
667Debug.Assert(_compilation.Conversions.ClassifyConversionFromType(rewrittenReceiver.Type, memberSymbol.ContainingType, isChecked: false, ref discardedUseSiteInfo).IsImplicit ||
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
152return c.IsImplicit;
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ConversionExtensions.cs (1)
12(conversion.IsImplicit && conversion.IsReference);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (6)
233if (conversion.IsImplicit && 407if (originalParentConversion.IsImplicit) 739if (!innerOriginalConversion.IsImplicit || !innerOriginalConversion.IsNullable) 750if (!outerOriginalConversion.IsImplicit || !outerOriginalConversion.IsNullable) 777if (!originalConversion.IsImplicit || !originalConversion.IsNumeric) 889conditionalParentConversion.GetConversion().IsImplicit &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
181=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
146return conversion.IsImplicit && conversion.IsReference;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
156=> compilation.ClassifyConversion(source: source, destination: destination).IsImplicit;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
FirstClassSpanTests.cs (1)
2834Assert.True(argConv.IsImplicit);
Microsoft.CodeAnalysis.CSharp.Features (8)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
37semanticModel.ClassifyConversion(expressionSyntax, targetType).IsImplicit;
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (2)
113if (conv.IsImplicit && (conv.IsConstantExpression || conv.IsEnumeration)) 133if (!conversion.IsImplicit ||
GenerateType\CSharpGenerateTypeService.cs (1)
541=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
SignatureHelp\LightweightOverloadResolution.cs (2)
126&& semanticModel.ClassifyConversion(argument.Expression, arrayType.ElementType).IsImplicit) 131return semanticModel.ClassifyConversion(argument.Expression, type).IsImplicit;
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
181=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
146return conversion.IsImplicit && conversion.IsReference;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\FunctionPointerTests.cs (7)
215Assert.True(conversion.IsImplicit); 300Assert.True(conversion.IsImplicit); 357Assert.False(conversion.IsImplicit); 460Assert.False(conversion.IsImplicit); 510Assert.False(conversion.IsImplicit); 846Assert.True(conversion.IsImplicit); 903Assert.Equal(expectedImplicit, conversion.IsImplicit);
Semantics\ImplicitObjectCreationTests.cs (1)
1934Assert.True(model.GetConversion(def).IsImplicit);
Semantics\TargetTypedDefaultTests.cs (1)
3531Assert.True(conversion.IsImplicit);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Compilation\GetSemanticInfoTests.cs (29)
635Assert.True(impconv.IsImplicit); 641Assert.True(conv.IsImplicit); 672Assert.False(conv.IsImplicit); 677Assert.True(conv.IsImplicit); 683Assert.True(conv.IsImplicit); 689Assert.True(conv.IsImplicit); 695Assert.True(conv.IsImplicit); 701Assert.True(conv.IsImplicit); 707Assert.True(conv.IsImplicit); 713Assert.True(conv.IsImplicit); 719Assert.True(conv.IsImplicit); 726Assert.False(conv.IsImplicit); 731Assert.True(conv.IsImplicit); 737Assert.True(conv.IsImplicit); 743Assert.True(conv.IsImplicit); 749Assert.True(conv.IsImplicit); 755Assert.False(conv.IsImplicit); 761Assert.False(conv.IsImplicit); 767Assert.False(conv.IsImplicit); 773Assert.False(conv.IsImplicit); 779Assert.False(conv.IsImplicit); 785Assert.False(conv.IsImplicit); 791Assert.True(conv.IsImplicit); 798Assert.True(conv.IsImplicit); 805Assert.False(conv.IsImplicit); 812Assert.False(conv.IsImplicit); 819Assert.False(conv.IsImplicit); 826Assert.False(conv.IsImplicit); 5993Assert.False(foreachSymbolInfo.CurrentConversion.IsImplicit);
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
7488Assert.True(semanticInfo.ImplicitConversion.IsImplicit);
Symbols\ConversionTests.cs (2)
403Assert.True(conversion.IsImplicit); 416Assert.True(conversion.IsImplicit);
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ConversionExtensions.cs (1)
12(conversion.IsImplicit && conversion.IsReference);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (6)
233if (conversion.IsImplicit && 407if (originalParentConversion.IsImplicit) 739if (!innerOriginalConversion.IsImplicit || !innerOriginalConversion.IsNullable) 750if (!outerOriginalConversion.IsImplicit || !outerOriginalConversion.IsNullable) 777if (!originalConversion.IsImplicit || !originalConversion.IsNumeric) 889conditionalParentConversion.GetConversion().IsImplicit &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
156=> compilation.ClassifyConversion(source: source, destination: destination).IsImplicit;
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
729return conversion.IsIdentity || (conversion.IsReference && conversion.IsImplicit);
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (1)
731return conversion.IsReference && conversion.IsImplicit;
ParserUtilities.cs (1)
55return conversion.IsIdentity || (conversion.IsReference && conversion.IsImplicit);
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
288return conversion.IsReference && conversion.IsImplicit;
Microsoft.Gen.Logging (1)
src\Generators\Shared\ParserUtilities.cs (1)
60return conversion.IsIdentity || (conversion.IsReference && conversion.IsImplicit);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\ParserUtilities.cs (1)
60return conversion.IsIdentity || (conversion.IsReference && conversion.IsImplicit);
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\ParserUtilities.cs (1)
60return conversion.IsIdentity || (conversion.IsReference && conversion.IsImplicit);