@@ -11,9 +11,15 @@ allocated(f::F, args::Tuple) where {F} = @allocated f(args...)
11
11
allocated (:: Type{T} , args:: Tuple ) where {T} = @allocated T (args... )
12
12
test_noalloc (f:: F , args:: Tuple ) where {F} = @test iszero (allocated (f, args))
13
13
test_noalloc (:: Type{T} , args:: Tuple ) where {T} = @test iszero (allocated (T, args))
14
- test_inferred (f:: F , :: Type{R} , args:: Tuple ) where {F,R} = @test (@inferred f (args... )) isa R
15
- test_inferred (:: Type{T} , :: Type{R} , args:: Tuple ) where {T,R} = @test (@inferred T (args... )) isa R
16
- test_inferred (:: Type{T} , args:: Tuple ) where {T } = test_inferred (T, T, args)
14
+ function test_inferred (f:: F , :: Type{R} , args:: Tuple ) where {F,R}
15
+ @test isconcretetype (R) # meta: test-strictness test
16
+ @test (@inferred f (args... )) isa R
17
+ end
18
+ function test_inferred (:: Type{T} , :: Type{R} , args:: Tuple ) where {T,R}
19
+ @test isconcretetype (R) # meta: test-strictness test
20
+ @test (@inferred T (args... )) isa R
21
+ end
22
+ test_inferred (:: Type{T} , args:: Tuple ) where {T} = test_inferred (T, T, args)
17
23
function test_inferred_noalloc (f:: F , :: Type{R} , args:: Tuple ) where {F,R}
18
24
test_noalloc (f, args)
19
25
test_inferred (f, R, args)
0 commit comments