You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-error @+1 {{result type 'NonDiffType' does not conform to 'Differentiable' and satisfy 'NonDiffType == NonDiffType.TangentVector', but the enclosing function type is '@differentiable(_linear)'}}
29
29
let _:@differentiable(_linear)(Float)->NonDiffType
30
30
31
+
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a differentiable result}}
32
+
let _:@differentiable(reverse)(inoutFloat)->Float
33
+
34
+
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a differentiable result}}
35
+
let _:@differentiable(_linear)(inoutFloat)->Float
36
+
31
37
// Emit `@noDerivative` fixit iff there is at least one valid linearity parameter.
32
38
// expected-error @+1 {{parameter type 'NonDiffType' does not conform to 'Differentiable' and satisfy 'NonDiffType == NonDiffType.TangentVector', but the enclosing function type is '@differentiable(_linear)'; did you want to add '@noDerivative' to this parameter?}} {{41-41=@noDerivative }}
33
39
let _:@differentiable(_linear)(Float,NonDiffType)->Float
@@ -40,10 +46,10 @@ let _: @differentiable(_linear) (Float) -> NonDiffType
40
46
41
47
let _:@differentiable(_linear)(Float)->Float
42
48
43
-
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a result}}
49
+
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a differentiable result}}
44
50
let _:@differentiable(reverse)(inoutFloat)->Float
45
51
46
-
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a result}}
52
+
// expected-error @+1 {{'@differentiable' function type cannot have both a differentiable 'inout' parameter and a differentiable result}}
47
53
let _:@differentiable(_linear)(inoutFloat)->Float
48
54
49
55
// expected-error @+1 {{result type '@differentiable(reverse) (U) -> Float' does not conform to 'Differentiable', but the enclosing function type is '@differentiable'}}
0 commit comments