[Sema] TypeWrappers: Availability of init(storageWrapper:) should match that of $Storage

This commit is contained in:
Pavel Yaskevich
2022-12-22 17:23:51 -08:00
parent ed2e07e0a1
commit 0987eff828
2 changed files with 1 additions and 2 deletions

View File

@@ -362,7 +362,7 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
params.push_back(arg); params.push_back(arg);
} }
} else if (ICK == ImplicitConstructorKind::TypeWrapperStorage) { } else if (ICK == ImplicitConstructorKind::TypeWrapperStorage) {
accessLevel = AccessLevel::Public; accessLevel = decl->getTypeWrapperStorageDecl()->getFormalAccess();
auto typeWrapperInfo = decl->getTypeWrapper(); auto typeWrapperInfo = decl->getTypeWrapper();
assert(typeWrapperInfo); assert(typeWrapperInfo);

View File

@@ -32,7 +32,6 @@ public struct Wrapper<W, S> {
// CHECK: @TypeWrappers.Wrapper public class Test<T> where T : Swift.StringProtocol { // CHECK: @TypeWrappers.Wrapper public class Test<T> where T : Swift.StringProtocol {
// CHECK: public init(a: Swift.Int, b: [T]) // CHECK: public init(a: Swift.Int, b: [T])
// CHECK: public init(storageWrapper: TypeWrappers.Wrapper<TypeWrappers.Test<T>, TypeWrappers.Test<T>.$Storage>)
// CHECK: } // CHECK: }
@Wrapper @Wrapper