Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (107)
30Private Shared ReadOnly s_conversionTable As ConversionClass()()
37Const bad_ As ConversionClass = ConversionClass.Bad
38Const iden As ConversionClass = ConversionClass.Identity
39Const wide As ConversionClass = ConversionClass.Widening
40Const narr As ConversionClass = ConversionClass.Narrowing
41Const none As ConversionClass = ConversionClass.None
45s_conversionTable = New ConversionClass(max)() _
47New ConversionClass(max) {bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_},
48New ConversionClass(max) {bad_, iden, bad_, wide, wide, wide, wide, wide, wide, wide, wide, wide, wide, wide, wide, wide, wide, bad_, wide},
49New ConversionClass(max) {bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_},
50New ConversionClass(max) {bad_, narr, bad_, iden, none, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, none, bad_, narr},
51New ConversionClass(max) {bad_, narr, bad_, none, iden, none, none, none, none, none, none, none, none, none, none, none, none, bad_, narr},
52New ConversionClass(max) {bad_, narr, bad_, narr, none, iden, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, none, bad_, narr},
53New ConversionClass(max) {bad_, narr, bad_, narr, none, narr, iden, narr, narr, narr, narr, narr, narr, narr, narr, narr, none, bad_, narr},
54New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, iden, narr, narr, narr, narr, narr, narr, narr, narr, none, bad_, narr},
55New ConversionClass(max) {bad_, narr, bad_, narr, none, narr, wide, narr, iden, narr, narr, narr, narr, narr, narr, narr, none, bad_, narr},
56New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, wide, wide, iden, narr, narr, narr, narr, narr, narr, none, bad_, narr},
57New ConversionClass(max) {bad_, narr, bad_, narr, none, narr, wide, narr, wide, narr, iden, narr, narr, narr, narr, narr, none, bad_, narr},
58New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, wide, wide, wide, wide, iden, narr, narr, narr, narr, none, bad_, narr},
59New ConversionClass(max) {bad_, narr, bad_, narr, none, narr, wide, narr, wide, narr, wide, narr, iden, narr, narr, narr, none, bad_, narr},
60New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, wide, wide, wide, wide, wide, wide, iden, narr, wide, none, bad_, narr},
61New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, wide, wide, wide, wide, wide, wide, wide, iden, wide, none, bad_, narr},
62New ConversionClass(max) {bad_, narr, bad_, narr, none, wide, wide, wide, wide, wide, wide, wide, wide, narr, narr, iden, none, bad_, narr},
63New ConversionClass(max) {bad_, narr, bad_, none, none, none, none, none, none, none, none, none, none, none, none, none, iden, bad_, narr},
64New ConversionClass(max) {bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_, bad_},
65New ConversionClass(max) {bad_, narr, bad_, narr, wide, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, narr, bad_, iden}
180Friend Shared Function ClassifyConversion(ByVal targetType As System.Type, ByVal sourceType As System.Type, ByRef operatorMethod As Method) As ConversionClass
187Dim result As ConversionClass = ClassifyPredefinedConversion(targetType, sourceType)
189If result = ConversionClass.None AndAlso
202Friend Shared Function ClassifyIntrinsicConversion(ByVal targetTypeCode As TypeCode, ByVal sourceTypeCode As TypeCode) As ConversionClass
209Friend Shared Function ClassifyPredefinedCLRConversion(ByVal targetType As System.Type, ByVal sourceType As System.Type) As ConversionClass
218If targetType Is sourceType Then Return ConversionClass.Identity
222Return ConversionClass.Widening
226Return ConversionClass.Narrowing
236Return ConversionClass.Narrowing
240Return ConversionClass.Narrowing
245Return ConversionClass.Narrowing
247Return ConversionClass.None
251Return ConversionClass.Narrowing
262Return ConversionClass.Widening
264Return ConversionClass.None
270Return ConversionClass.Widening
272Return ConversionClass.Narrowing
284Return ConversionClass.Narrowing
286Return ConversionClass.Widening
290Return ConversionClass.None
296Return ConversionClass.None
301Dim classification As ConversionClass =
304If classification = ConversionClass.Widening OrElse
305classification = ConversionClass.Identity Then
309Return ConversionClass.Widening
315Dim classification As ConversionClass =
318If classification = ConversionClass.Widening OrElse
319classification = ConversionClass.Identity Then
323Return ConversionClass.Widening
327Return IIf(IsInterface(targetType), ConversionClass.Narrowing, ConversionClass.None)
337Return ConversionClass.Narrowing
340Return ConversionClass.None
352Return ConversionClass.None
355Return ConversionClass.None
360Private Shared Function ClassifyCLRArrayToInterfaceConversion(ByVal targetInterface As System.Type, ByVal sourceArrayType As System.Type) As ConversionClass
368Return ConversionClass.Widening
374Return ConversionClass.Narrowing
394Dim conversion As ConversionClass = ConversionClass.None
418If (conversion = ConversionClass.Identity OrElse
419conversion = ConversionClass.Widening) Then
421Return ConversionClass.Widening
424Return ConversionClass.Narrowing
430Private Shared Function ClassifyCLRConversionForArrayElementTypes(ByVal targetElementType As System.Type, ByVal sourceElementType As System.Type) As ConversionClass
455Return ConversionClass.Identity
460Return ConversionClass.Widening
465Return ConversionClass.Narrowing
469Return ConversionClass.None
474Friend Shared Function ClassifyPredefinedConversion(ByVal targetType As System.Type, ByVal sourceType As System.Type) As ConversionClass
481If targetType Is sourceType Then Return ConversionClass.Identity
493Return ConversionClass.Narrowing
502Return ConversionClass.Widening
513Return ConversionClass.Widening
518Return ConversionClass.Narrowing
567Dim result As ConversionClass = ClassifyPredefinedConversion(larger, smaller)
569Return result = ConversionClass.Widening OrElse result = ConversionClass.Identity
579Dim result As ConversionClass = ClassifyPredefinedConversion(larger, smaller)
581Return result = ConversionClass.Narrowing OrElse result = ConversionClass.Identity
793ClassifyPredefinedConversion(resultType, inputType) <> ConversionClass.None Then
874ByRef operatorMethod As Method) As ConversionClass
876Dim result As ConversionClass
883Return ConversionClass.None
931ByRef foundSourceTypeOperators As Boolean) As ConversionClass
944Debug.Assert(ClassifyPredefinedConversion(targetType, sourceType) = ConversionClass.None,
958Return ConversionClass.None
975Return ConversionClass.Widening
996Return ConversionClass.Narrowing
1000Return ConversionClass.None
1010Return ConversionClass.Ambiguous
1024Friend Classification As ConversionClass
1080ByVal classification As ConversionClass,
1101ByRef classification As ConversionClass,
1118classification = ConversionClass.Bad