Skip to content

Commit 56f2040

Browse files
authored
Add a non-intersection/less specific test
1 parent 2b65954 commit 56f2040

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/worlds.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,13 @@ end
330330
@inline (::Type{SSC})(a::AbstractVector) where {SSC <: SHermitianCompact} = SSC((a...,))
331331
x = SHermitianCompact{1,Float32,3}([1.0f0, 2.0f0, 3.0f0])
332332
@test_broken worlds(mi) == w
333+
334+
## A case in which there is no intersection between signatures
335+
## A possibly relevant point is that the invalidated instance comes from
336+
## convert(::Type{T}, x) where {T>:Nothing} = convert(nonnothingtype_checked(T), x)
337+
## and that >: is relatively unusual among method signatures.
338+
abstract type Colorant end
339+
mi = instance(convert, (Type{Nothing}, String))
340+
w = worlds(mi)
341+
Base.convert(::Type{C}, c) where C<:Colorant = false
342+
@test_broken worlds(mi) == w

0 commit comments

Comments
 (0)