Skip to content

Commit 52dad64

Browse files
committed
Remove hasmissing as well
1 parent 96cf6ef commit 52dad64

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/compiler.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,6 @@ function add_return_to_last_statment(body::Expr)
583583
return Expr(body.head, new_args...)
584584
end
585585

586-
const FloatOrArrayType = Type{<:Union{AbstractFloat,AbstractArray}}
587-
hasmissing(::Type) = false
588-
hasmissing(::Type{>:Missing}) = true
589-
hasmissing(::Type{<:AbstractArray{TA}}) where {TA} = hasmissing(TA)
590-
hasmissing(::Type{Union{}}) = false # issue #368
591-
592586
"""
593587
TypeWrap{T}
594588

test/compiler.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -666,20 +666,6 @@ module Issue537 end
666666
@test demo_ret_with_ret()() === Val(1)
667667
end
668668

669-
@testset "issue #368: hasmissing dispatch" begin
670-
@test !DynamicPPL.hasmissing(typeof(Union{}[]))
671-
672-
# (nested) arrays with `Missing` eltypes
673-
@test DynamicPPL.hasmissing(Vector{Union{Missing,Float64}})
674-
@test DynamicPPL.hasmissing(Matrix{Union{Missing,Real}})
675-
@test DynamicPPL.hasmissing(Vector{Matrix{Union{Missing,Float32}}})
676-
677-
# no `Missing`
678-
@test !DynamicPPL.hasmissing(Vector{Float64})
679-
@test !DynamicPPL.hasmissing(Matrix{Real})
680-
@test !DynamicPPL.hasmissing(Vector{Matrix{Float32}})
681-
end
682-
683669
@testset "issue #393: anonymous argument with type parameter" begin
684670
@model f_393(::Val{ispredict}=Val(false)) where {ispredict} = ispredict ? 0 : 1
685671
@test f_393()() == 1

0 commit comments

Comments
 (0)