Skip to content

Commit 3fbd2bb

Browse files
committed
Fix a typo and a test.
1 parent 71a73e4 commit 3fbd2bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2881,7 +2881,7 @@ ERROR(differentiable_attr_ambiguous_function_identifier,none,
28812881
"ambiguous or overloaded identifier %0 cannot be used in '@differentiable' "
28822882
"attribute", (DeclName))
28832883
ERROR(differentiable_attr_invalid_access,none,
2884-
"deriavtive function %0 is required to either be public or "
2884+
"derivative function %0 is required to either be public or "
28852885
"'@usableFromInline' because the original function %1 is public or "
28862886
"'@usableFromInline'", (DeclName, DeclName))
28872887
ERROR(differentiable_attr_result_not_differentiable,none,

test/AutoDiff/differentiable_attr_access_control.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ private func foo3(_ x: Float) -> Float { return 1 }
2020
private func dfoo3(_ x: Float) -> (Float, (Float) -> Float) { return (1, {$0}) }
2121

2222
// Error: vjp not exported.
23-
@differentiable(vjp: dbar1) // expected-error {{associated differentiation function 'dbar1' is required to either be public or @usableFromInline because the original function 'bar1' is public or @usableFromInline}}
23+
@differentiable(vjp: dbar1) // expected-error {{derivative function 'dbar1' is required to either be public or '@usableFromInline' because the original function 'bar1' is public or '@usableFromInline'}}
2424
public func bar1(_ x: Float) -> Float { return 1 }
2525
private func dbar1(_ x: Float) -> (Float, (Float) -> Float) { return (1, {$0}) }

0 commit comments

Comments
 (0)