Type checking the following file results in a warning package import of 'Foundation' was not used in package declarations despite NSObject actually being using in a declaration that is marked as package.
package import Foundation
import os // os_log
package func foo(x: NSObject) {}
Interestingly, this issue does not occur if:
os is not imported
public instead of package declarations are used
Date or NSString is used from Foundation instead of NSObject.