New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-15586] import Foundation
hides declarations (derived from C) in other modules on Linux.
#57889
Comments
EDIT: EDIT2: |
Compiler steps when "user.swift" is compiled (as far as I can see): 1. Tries to resolve the type named "A". Next...
Difference on Linux between with/without
The "Lookup Table" is I don't know why such differences exist... |
May " EDIT: EDIT2: |
@DougGregor |
I filed the reduced case as SR-15582 which indicates that this issue does matter on any platforms. |
@swift-ci create |
Environment
OS: Ubuntu 20.04
Swift: Swift version 5.5.1 (swift-5.5.1-RELEASE)
Additional Detail from JIRA
md5: b3998f08d2120933f50adee706bb7dd1
relates to:
Issue Description:
NOTE: This issue is probably related to SR-15532.
How to reproduce
Step 1: Prepare 3 files; "c.h", "library.swift", and "user.swift"
c.h
library.swift
user.swift
Step 2: Compile "library.swift" as library named "MyLibR" using "c.h"
Step 3: Compile "user.swift"
Results
macOS + Swift 5.5
"user.swift" is compiled successfully.
Linux + Swift 5.5
"user.swift" cannot be compiled with the error message below:
Discussion
import Foundation
is not necessary in "user.swift". As described in the file, "user.swift" can be compiled successfully even on Linux whenimport Foundation
is removed.import Glibc
instead ofimport Foundation
also causes the failure.The text was updated successfully, but these errors were encountered: