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
// FIXME: Properly type-check parameters and the result's differentiability
22
21
// expected-error @+1 {{parameter type 'NonDiffType' does not conform to 'Differentiable', but the enclosing function type is '@differentiable'}}
23
22
let _:@differentiable(reverse)(NonDiffType)->Float
24
23
@@ -41,6 +40,12 @@ let _: @differentiable(_linear) (Float) -> NonDiffType
41
40
42
41
let _:@differentiable(_linear)(Float)->Float
43
42
43
+
// expected-error @+1 {{'@differentiable' function type cannot have both an 'inout' parameter and a differentiable result}}
44
+
let _:@differentiable(reverse)(inoutFloat)->Float
45
+
46
+
// expected-error @+1 {{'@differentiable' function type cannot have both an 'inout' parameter and a differentiable result}}
47
+
let _:@differentiable(_linear)(inoutFloat)->Float
48
+
44
49
// expected-error @+1 {{result type '@differentiable(reverse) (U) -> Float' does not conform to 'Differentiable', but the enclosing function type is '@differentiable'}}
0 commit comments