Skip to content

Commit b833271

Browse files
committed
Simplify test before stdlib derivatives are upstreamed.
1 parent d93a818 commit b833271

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import _Differentiation
1010

1111
@differentiable
1212
func basic(_ x: Float) -> Float {
13-
return x + 2
13+
return x
1414
}
1515

1616
//===----------------------------------------------------------------------===//
@@ -21,7 +21,7 @@ func basic(_ x: Float) -> Float {
2121
func conditional(_ x: Float, _ flag: Bool) -> Float {
2222
let y: Float
2323
if flag {
24-
y = x + 1
24+
y = x
2525
} else {
2626
y = x
2727
}
@@ -60,7 +60,7 @@ func try_apply_rethrows(_ x: Float) -> Float {
6060
// expected-note @+2 {{when differentiating this function definition}}
6161
@differentiable
6262
func noReturn(_ x: Float) -> Float {
63-
let _ = x + 1
63+
let _ = x
6464
// expected-error @+2 {{missing return in a function expected to return 'Float'}}
6565
// expected-note @+1 {{missing return for differentiation}}
6666
}

0 commit comments

Comments
 (0)