diff --git a/base/inference.jl b/base/inference.jl index 273c126f77ceb..4da714ab20f01 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -245,7 +245,7 @@ isType(t::ANY) = isa(t,DataType) && is((t::DataType).name,Type.name) # true if Type is inlineable as constant isconstType(t::ANY,b::Bool) = isType(t) && !has_typevars(t.parameters[1],b) && - !issubtype(Tuple{Vararg}, t.parameters[1]) # work around inference bug #18450 + !issubtype(Type{Tuple{Vararg}}, t) # work around inference bug #18450 const IInf = typemax(Int) # integer infinity const n_ifunc = reinterpret(Int32,arraylen)+1 diff --git a/test/inference.jl b/test/inference.jl index f388d4c8b427f..d34e39a56ab2d 100644 --- a/test/inference.jl +++ b/test/inference.jl @@ -368,3 +368,6 @@ end # issue #18450 f18450() = ifelse(true, Tuple{Vararg{Int}}, Tuple{Vararg}) @test f18450() == Tuple{Vararg{Int}} + +# issue #18569 +@test Core.Inference.isconstType(Type{Tuple},true)