Skip to content

Commit b4ac3d0

Browse files
authored
Replace conditional throw with assertion for key check
1 parent c954cde commit b4ac3d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/jlgen.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,7 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world)
614614

615615
# inference should have populated our cache
616616
wvc = WorldView(cache, min_world, max_world)
617-
if !CC.haskey(wvc, mi)
618-
throw(AssertionError("GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world"))
619-
end
617+
@assert CC.haskey(wvc, mi) "GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world"
620618
ci = CC.getindex(wvc, mi)
621619

622620
# if ci is rettype_const, the inference result won't have been cached

0 commit comments

Comments
 (0)