Skip to content

Commit 916ebc2

Browse files
authored
Add a case of convert with T<:abstracttype
1 parent 89720e9 commit 916ebc2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/worlds.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ x = SHermitianCompact{1,Float32,3}([1.0f0, 2.0f0, 3.0f0])
335335
## A possibly relevant point is that the invalidated instance comes from
336336
## convert(::Type{T}, x) where {T>:Nothing} = convert(nonnothingtype_checked(T), x)
337337
## and that >: is relatively unusual among method signatures.
338+
mi1 = instance(convert, (Type{Nothing}, String))
339+
w1 = worlds(mi1)
340+
mi2 = instance(Base.structdiff, (NamedTuple{(:by,),_A} where _A<:Tuple, Type{NamedTuple{(:by, :rev),T} where T<:Tuple}))
341+
w2 = worlds(mi2)
338342
abstract type Colorant end
339-
mi = instance(convert, (Type{Nothing}, String))
340-
w = worlds(mi)
341343
Base.convert(::Type{C}, c) where C<:Colorant = false
342-
@test_broken worlds(mi) == w
344+
@test_broken worlds(mi1) == w1
345+
@test_broken worlds(mi2) == w2

0 commit comments

Comments
 (0)