File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
test/AutoDiff/SILOptimizer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import _Differentiation
10
10
11
11
@differentiable
12
12
func basic( _ x: Float ) -> Float {
13
- return x + 2
13
+ return x
14
14
}
15
15
16
16
//===----------------------------------------------------------------------===//
@@ -21,7 +21,7 @@ func basic(_ x: Float) -> Float {
21
21
func conditional( _ x: Float , _ flag: Bool ) -> Float {
22
22
let y : Float
23
23
if flag {
24
- y = x + 1
24
+ y = x
25
25
} else {
26
26
y = x
27
27
}
@@ -60,7 +60,7 @@ func try_apply_rethrows(_ x: Float) -> Float {
60
60
// expected-note @+2 {{when differentiating this function definition}}
61
61
@differentiable
62
62
func noReturn( _ x: Float ) -> Float {
63
- let _ = x + 1
63
+ let _ = x
64
64
// expected-error @+2 {{missing return in a function expected to return 'Float'}}
65
65
// expected-note @+1 {{missing return for differentiation}}
66
66
}
You can’t perform that action at this time.
0 commit comments