Skip to content

Commit 3b3a2bb

Browse files
authored
[AutoDiff] NFC: minor cleanup after TF-1077. (#28913)
Fix inaccurate test comment.
1 parent df6be21 commit 3b3a2bb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ ConstructorDecl *swift::getOrCreateEffectiveMemberwiseInitializer(
290290
for (auto *member : nominal->getMembers()) {
291291
auto var = dyn_cast<VarDecl>(member);
292292
if (!var ||
293-
!var->isMemberwiseInitialized(/*preferDeclaredProperties=*/true))
293+
!var->isMemberwiseInitialized(/*preferDeclaredProperties*/ true))
294294
continue;
295295
accessLevel = std::min(accessLevel, var->getFormalAccess());
296296
}

test/Sema/differentiable_access_level.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// SWIFT_ENABLE_TENSORFLOW
22
// RUN: %target-swift-frontend -print-ast %s | %FileCheck %s
33

4-
// Test `Differentiable` derived conformances.
5-
// Verify access levels of synthesized `TangentVector` types and their memberwise initializers.
6-
// `TangentVector` memberwise initializer access level should match `TangentVector` access level.
4+
// TF-1077: Verify access levels of `TangentVector` types and their memberwise
5+
// initializers, synthesized during `Differentiable` derived conformances.
6+
7+
// `TangentVector` memberwise initializer access level should default to true,
8+
// for usability.
79

810
public struct PublicStruct: Differentiable {}
911
internal struct InternalStruct: Differentiable {}

0 commit comments

Comments
 (0)