Skip to content

Commit 228aaa4

Browse files
authored
Replace if statement with assert for key check
1 parent b4ac3d0 commit 228aaa4

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
@@ -630,9 +630,7 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world)
630630
# inference should have populated our cache
631631
wvc = WorldView(cache, min_world, max_world)
632632

633-
if !CC.haskey(wvc, mi)
634-
throw(AssertionError("GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world"))
635-
end
633+
@assert CC.haskey(wvc, mi) "GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world"
636634
ci = CC.getindex(wvc, mi)
637635

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

0 commit comments

Comments
 (0)