@@ -22,37 +22,33 @@ was parametric, or `Union` if `Foo` was a type alias for a `Union`)
22
22
function test_method_signature end
23
23
24
24
function test_method_signature (:: typeof (rrule), method:: Method )
25
- @testset " Sensible Constructors" begin
26
- function_type = if method. sig <: Tuple{Any, RuleConfig, Type, Vararg}
27
- _parameters (method. sig)[3 ]
28
- elseif method. sig <: Tuple{Any, Type, Vararg}
29
- _parameters (method. sig)[2 ]
30
- else
31
- nothing
32
- end
33
-
34
- @test_msg (
35
- " Bad constructor rrule. `typeof(T)` used rather than `Type{T}`. $method " ,
36
- function_type ∉ (DataType, UnionAll, Union)
37
- )
25
+ function_type = if method. sig <: Tuple{Any, RuleConfig, Type, Vararg}
26
+ _parameters (method. sig)[3 ]
27
+ elseif method. sig <: Tuple{Any, Type, Vararg}
28
+ _parameters (method. sig)[2 ]
29
+ else
30
+ nothing
38
31
end
32
+
33
+ @test_msg (
34
+ " Bad constructor rrule. `typeof(T)` used rather than `Type{T}`. $method " ,
35
+ function_type ∉ (DataType, UnionAll, Union)
36
+ )
39
37
end
40
38
41
39
function test_method_signature (:: typeof (frule), method:: Method )
42
- @testset " Sensible Constructors" begin
43
- function_type = if method. sig <: Tuple{Any, RuleConfig, Any, Type, Vararg}
44
- _parameters (method. sig)[4 ]
45
- elseif method. sig <: Tuple{Any, Any, Type, Vararg}
46
- _parameters (method. sig)[3 ]
47
- else
48
- nothing
49
- end
50
-
51
- @test_msg (
52
- " Bad constructor frule. `typeof(T)` used rather than `Type{T}`. $method " ,
53
- function_type ∉ (DataType, UnionAll, Union)
54
- )
40
+ function_type = if method. sig <: Tuple{Any, RuleConfig, Any, Type, Vararg}
41
+ _parameters (method. sig)[4 ]
42
+ elseif method. sig <: Tuple{Any, Any, Type, Vararg}
43
+ _parameters (method. sig)[3 ]
44
+ else
45
+ nothing
55
46
end
47
+
48
+ @test_msg (
49
+ " Bad constructor frule. `typeof(T)` used rather than `Type{T}`. $method " ,
50
+ function_type ∉ (DataType, UnionAll, Union)
51
+ )
56
52
end
57
53
58
54
"""
0 commit comments