101 references to RequiredConversion
Microsoft.CodeAnalysis.VisualBasic (101)
Binding\Binder_Expressions.vb (4)
4530typeList.AddType(expressionType, RequiredConversion.Any, expression) 4535typeList.AddType(expressionType, RequiredConversion.Any, expression) 4548typeList.AddType(expressionType, RequiredConversion.Any, expression) 4554typeList.AddType(expressionType, RequiredConversion.Any, expression)
Binding\Binder_Query.vb (2)
3492inferenceCollection.AddType(outerKey.Type, RequiredConversion.Any, outerKey) 3493inferenceCollection.AddType(innerKey.Type, RequiredConversion.Any, innerKey)
Semantics\Conversions.vb (57)
4335Public Shared Function InvertConversionRequirement(restriction As RequiredConversion) As RequiredConversion 4337Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update InvertConversionRequirement()") 4344If restriction = RequiredConversion.AnyReverse Then 4345Return RequiredConversion.Any 4346ElseIf restriction = RequiredConversion.ReverseReference Then 4347Return RequiredConversion.Reference 4351If restriction = RequiredConversion.Any Then 4352Return RequiredConversion.AnyReverse 4353ElseIf restriction = RequiredConversion.ArrayElement Then 4355Return RequiredConversion.ReverseReference 4356ElseIf restriction = RequiredConversion.Reference Then 4357Return RequiredConversion.ReverseReference 4366Public Shared Function StrengthenConversionRequirementToReference(restriction As RequiredConversion) As RequiredConversion 4367Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update StrengthenConversionRequirementToReference()") 4373If restriction = RequiredConversion.AnyReverse Then 4374Return RequiredConversion.ReverseReference 4375ElseIf restriction = RequiredConversion.Any OrElse restriction = RequiredConversion.ArrayElement Then 4376Return RequiredConversion.Reference 4377ElseIf restriction = RequiredConversion.AnyAndReverse Then 4378Return RequiredConversion.Identity 4386restriction1 As RequiredConversion, 4387restriction2 As RequiredConversion 4388) As RequiredConversion 4390Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update CombineInferenceRestrictions()") 4402If restriction1 = RequiredConversion.None Then 4404ElseIf restriction2 = RequiredConversion.None Then 4409If restriction1 = RequiredConversion.Identity OrElse restriction2 = RequiredConversion.Identity Then 4410Return RequiredConversion.Identity 4414If (restriction1 = RequiredConversion.AnyReverse OrElse restriction1 = RequiredConversion.ReverseReference) AndAlso 4415(restriction2 = RequiredConversion.AnyReverse OrElse restriction2 = RequiredConversion.ReverseReference) Then 4416Return RequiredConversion.ReverseReference 4420If (restriction1 = RequiredConversion.Any OrElse restriction1 = RequiredConversion.AnyReverse OrElse restriction1 = RequiredConversion.AnyAndReverse) AndAlso 4421(restriction2 = RequiredConversion.Any OrElse restriction2 = RequiredConversion.AnyReverse OrElse restriction2 = RequiredConversion.AnyAndReverse) Then 4422Return RequiredConversion.AnyAndReverse 4426If (restriction1 = RequiredConversion.Any OrElse restriction1 = RequiredConversion.ArrayElement) AndAlso 4427(restriction2 = RequiredConversion.Any OrElse restriction2 = RequiredConversion.ArrayElement) Then 4428Return RequiredConversion.ArrayElement 4430ElseIf (restriction1 = RequiredConversion.Any OrElse restriction1 = RequiredConversion.ArrayElement OrElse restriction1 = RequiredConversion.Reference) AndAlso 4431(restriction2 = RequiredConversion.Any OrElse restriction2 = RequiredConversion.ArrayElement OrElse restriction2 = RequiredConversion.Reference) Then 4432Return RequiredConversion.Reference 4436Return RequiredConversion.Identity
Semantics\TypeInference\TypeArgumentInference.vb (25)
361inferenceRestrictions As RequiredConversion 543Dim inferenceRestrictions As RequiredConversion = RequiredConversion.Any 550Debug.Assert(inferenceRestrictions = RequiredConversion.Any, "there should have been no prior restrictions by the time we encountered ByRef") 556Debug.Assert(inferenceRestrictions = RequiredConversion.AnyAndReverse, "expected ByRef to require AnyAndReverseConversion") 1224inferenceRestrictions:=RequiredConversion.Any) 1283inferenceRestrictions As RequiredConversion 1362inferenceRestrictions As RequiredConversion 1484Dim paramInferenceRestrictions As RequiredConversion 1498paramInferenceRestrictions = RequiredConversion.Identity 1503If paramInferenceRestrictions = RequiredConversion.Reference Then 1505ElseIf paramInferenceRestrictions = RequiredConversion.ReverseReference Then 1551Conversions.CombineConversionRequirements(inferenceRestrictions, RequiredConversion.ArrayElement)) 1574Conversions.CombineConversionRequirements(inferenceRestrictions, If(argumentIsAarrayLiteral, RequiredConversion.Any, RequiredConversion.ArrayElement))) 1613inferenceRestrictions As RequiredConversion 1653(inferenceRestrictions = RequiredConversion.Any OrElse inferenceRestrictions = RequiredConversion.AnyReverse OrElse 1654inferenceRestrictions = RequiredConversion.AnyAndReverse) Then 1709RequiredConversion.AnyReverse) Then ' AnyReverse: contravariance in delegate arguments 1732RequiredConversion.Any) ' Any: covariance in delegate returns 1969inferenceRestrictions:=RequiredConversion.Any) 2027inferenceRestrictions:=RequiredConversion.Any) 2107inferenceRestrictions:=RequiredConversion.Any) 2237inferenceRestrictions:=RequiredConversion.Any)
Semantics\TypeInference\TypeInferenceCollection.vb (13)
26Public InferenceRestrictions As RequiredConversion 33InferenceRestrictions = RequiredConversion.Any 417hintRestrictions As RequiredConversion, 424Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update CheckHintSatisfaction()") 435ElseIf hintRestrictions = RequiredConversion.None Then 437ElseIf hintRestrictions = RequiredConversion.Identity Then 444ElseIf hintRestrictions = RequiredConversion.Any Then 473ElseIf hintRestrictions = RequiredConversion.AnyReverse Then 477ElseIf hintRestrictions = RequiredConversion.AnyAndReverse Then 497ElseIf hintRestrictions = RequiredConversion.ArrayElement Then 500ElseIf hintRestrictions = RequiredConversion.Reference Then 519ElseIf hintRestrictions = RequiredConversion.ReverseReference Then 560conversion As RequiredConversion,