Skip to content

Commit ebfbe62

Browse files
committed
Add test for eliminating apply_type/TypeVar
1 parent 8fa5296 commit ebfbe62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/inline.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,10 @@ function cprop_inline_baz2()
197197
return cprop_inline_bar(cprop_inline_foo2()..., cprop_inline_foo2()...)
198198
end
199199
@test length(code_typed(cprop_inline_baz2, ())[1][1].code) == 2
200+
201+
# Check that apply_type/TypeVar can be fully eliminated
202+
function f_apply_typevar(T)
203+
NTuple{N, T} where N
204+
return T
205+
end
206+
@test length(code_typed(f_apply_typevar, (Type{Any},))[1][1].code) == 1

0 commit comments

Comments
 (0)