Skip to content

Commit 37e279b

Browse files
committed
fix test for now
1 parent b0c5e1e commit 37e279b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/compiler/inference.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,17 @@ end
12521252
push!(constvec, 10)
12531253
@test @inferred(sizeof_constvec()) == sizeof(Int) * 4
12541254

1255-
test_const_return((x)->isdefined(x, :re), Tuple{ComplexF64}, true)
1255+
let
1256+
f = x->isdefined(x, :re)
1257+
t = Tuple{ComplexF64}
1258+
interp = Core.Compiler.NativeInterpreter()
1259+
linfo = get_linfo(f, t)
1260+
ci = Core.Compiler.getindex(Core.Compiler.code_cache(interp), get_linfo(f, t))
1261+
rc = ci.rettype_const
1262+
@test isa(rc, Core.InterConditional)
1263+
@test rc.vtype === ComplexF64 && rc.elsetype === Union{}
1264+
end
1265+
12561266
isdefined_f3(x) = isdefined(x, 3)
12571267
@test @inferred(isdefined_f3(())) == false
12581268
@test find_call(first(code_typed(isdefined_f3, Tuple{Tuple{Vararg{Int}}})[1]), isdefined, 3)

0 commit comments

Comments
 (0)