From 6880b9e47f57625e890594e0d0e11c59393b4bb9 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Wed, 6 Oct 2021 16:59:51 +0900 Subject: [PATCH] fix `InterConditional` edge case, update to https://github.com/JuliaLang/julia/pull/42434 --- src/Cthulhu.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cthulhu.jl b/src/Cthulhu.jl index 62ea6adf..c3218ac8 100644 --- a/src/Cthulhu.jl +++ b/src/Cthulhu.jl @@ -173,9 +173,9 @@ function codeinst_rt(code::CodeInstance) rettype_const = code.rettype_const if isa(rettype_const, Vector{Any}) && !(Vector{Any} <: rettype) return Core.PartialStruct(rettype, rettype_const) - elseif rettype <: Core.OpaqueClosure && isa(rettype_const, Core.PartialOpaque) + elseif isa(rettype_const, Core.PartialOpaque) && rettype <: Core.OpaqueClosure return rettype_const - elseif isa(rettype_const, Core.InterConditional) + elseif isa(rettype_const, Core.InterConditional) && !(Core.InterConditional <: rettype) return rettype_const else return Const(rettype_const)