Skip to content

Commit 71f3b3b

Browse files
committed
Don't allow implementationOnly with package visibility.
Follow up to #1472, looks like we didn't realize this gate should also be updated.
1 parent 498b0b8 commit 71f3b3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/protoc-gen-swift/FileGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class FileGenerator {
9191
p.print("\(comments)import Foundation")
9292

9393
if self.generatorOptions.implementationOnlyImports,
94-
self.generatorOptions.visibility == .public {
94+
self.generatorOptions.visibility != .internal {
9595
errorString = """
96-
Cannot use @_implementationOnly imports when the proto visibility is public.
96+
Cannot use @_implementationOnly imports when the proto visibility is public or package.
9797
Either change the visibility to internal, or disable @_implementationOnly imports.
9898
"""
9999
return

0 commit comments

Comments
 (0)