Skip to content

Commit 9e32a5f

Browse files
author
Eugene Burmako
committed
Fix test/AutoDiff/downstream/differentiable_attr_type_checking.swift
1 parent 29ce7f3 commit 9e32a5f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/AutoDiff/downstream/differentiable_attr_type_checking.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ func emptyWhereClause<T>(x: T) -> T {
532532
return x
533533
}
534534

535-
// expected-error @+1 {{trailing 'where' clause in '@differentiable' attribute of non-generic function 'nongenericWhereClause(x:)'}}
535+
// expected-error @+1 {{where' clause is valid only when original function is generic 'nongenericWhereClause(x:)}}
536536
@differentiable(where T : Differentiable)
537537
func nongenericWhereClause(x: Float) -> Float {
538538
return x
@@ -640,7 +640,7 @@ func invalidAnyObjectRequirement<T : Differentiable>(x: T) -> T {
640640
return x
641641
}
642642

643-
// expected-error @+1 {{'@differentiable' attribute does not support layout requirements}}
643+
// expected-error @+1 {{'@differentiable' attribute does not yet support layout requirements}}
644644
@differentiable(where Scalar : _Trivial)
645645
func invalidRequirementLayout<Scalar>(x: Scalar) -> Scalar {
646646
return x
@@ -846,19 +846,19 @@ struct NonDiffableStruct {
846846
}
847847

848848
// expected-warning @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
849-
@differentiable(linear, wrt: x, vjp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use 'transpose:' instead}}
849+
@differentiable(linear, wrt: x, vjp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use '@transpose' attribute for transpose registration instead}}
850850
func slope1(_ x: Float) -> Float {
851851
return 3 * x
852852
}
853853

854854
// expected-warning @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
855-
@differentiable(linear, wrt: x, jvp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use 'transpose:' instead}}
855+
@differentiable(linear, wrt: x, jvp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use '@transpose' attribute for transpose registration instead}}
856856
func slope2(_ x: Float) -> Float {
857857
return 3 * x
858858
}
859859

860860
// expected-warning @+1 2 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
861-
@differentiable(linear, jvp: const3, vjp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use 'transpose:' instead}}
861+
@differentiable(linear, jvp: const3, vjp: const3) // expected-error {{cannot specify 'vjp:' or 'jvp:' for linear functions; use '@transpose' attribute for transpose registration instead}}
862862
func slope3(_ x: Float) -> Float {
863863
return 3 * x
864864
}

0 commit comments

Comments
 (0)