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