From 3a92d385c46164618c23def8203d372c0ad8adf2 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Wed, 8 Feb 2023 14:53:15 +0900 Subject: [PATCH] add test cases for #48566 (#48584) --- test/compiler/effects.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/compiler/effects.jl b/test/compiler/effects.jl index c7f75fbda9a78..daa476a627a2a 100644 --- a/test/compiler/effects.jl +++ b/test/compiler/effects.jl @@ -759,6 +759,10 @@ end @test Base.ismutationfree(Type{Union{}}) @test Core.Compiler.is_total(Base.infer_effects(typejoin, ())) +# nothrow-ness of subtyping operations +# https://github.com/JuliaLang/julia/pull/48566 +@test !Core.Compiler.is_nothrow(Base.infer_effects((A,B)->A<:B, (Any,Any))) +@test !Core.Compiler.is_nothrow(Base.infer_effects((A,B)->A>:B, (Any,Any))) # GotoIfNot should properly mark itself as throwing when given a non-Bool # https://github.com/JuliaLang/julia/pull/48583