Option Strict On
Class UserDefinedNullableConversions1
    Shared Function Main() As Integer
        Dim d As Nullable(Of Decimal)
        Dim c As Nullable(Of Char)
        Dim from As Nullable(Of From)
        Dim [to] As Nullable(Of [To])

        ' vbc compiles char? -> decimal? using a user defined char->decimal widening operator on decimal
        d = c
        [to] = [from]
    End Function

    Structure From
        Dim i As Integer
        Public Shared Widening Operator CType(ByVal a As From) As [To]
            Return New [To]
        End Operator
    End Structure

    Structure [To]
        Dim i As Integer
    End Structure

End Class