Skip to content

Commit 0987eff

Browse files
committed
[Sema] TypeWrappers: Availability of init(storageWrapper:) should match that of $Storage
1 parent ed2e07e commit 0987eff

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
362362
params.push_back(arg);
363363
}
364364
} else if (ICK == ImplicitConstructorKind::TypeWrapperStorage) {
365-
accessLevel = AccessLevel::Public;
365+
accessLevel = decl->getTypeWrapperStorageDecl()->getFormalAccess();
366366

367367
auto typeWrapperInfo = decl->getTypeWrapper();
368368
assert(typeWrapperInfo);

test/ModuleInterface/type_wrappers.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public struct Wrapper<W, S> {
3232

3333
// CHECK: @TypeWrappers.Wrapper public class Test<T> where T : Swift.StringProtocol {
3434
// CHECK: public init(a: Swift.Int, b: [T])
35-
// CHECK: public init(storageWrapper: TypeWrappers.Wrapper<TypeWrappers.Test<T>, TypeWrappers.Test<T>.$Storage>)
3635
// CHECK: }
3736

3837
@Wrapper

0 commit comments

Comments
 (0)