Skip to content

Commit

Permalink
add test for code_typed on generated function (#22084)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored May 26, 2017
1 parent c3fb8e7 commit 85907b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,12 @@ let T = Tuple{Tuple{Int64, Void},
@test Core.Inference.limit_type_depth(T, 1) >: T
@test Core.Inference.limit_type_depth(T, 2) >: T
end

# Issue #20902, check that this doesn't error.
@generated function test_20902()
quote
10 + 11
end
end
@test length(code_typed(test_20902, (), optimize = false)) == 1
@test length(code_typed(test_20902, (), optimize = false)) == 1

0 comments on commit 85907b0

Please sign in to comment.