mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Deserialization may fail if a decl in a dependency changed type between the time a swiftmodule was built and when it was imported. This can happen because of changes to the SDK or use of C preprocessor macros. To help understand these problems, note the specific types causing the mismatch when it leads to a deserialization failure. ``` .../LibWithXRef.swiftmodule:1:1: error: reference to top-level declaration 'foo' broken by a context change; the declaration kind of 'foo' from 'A' changed since building 'LibWithXRef' 1 │ A.foo │ │ ├─ ... │ ├─ note: a candidate was filtered out because of a type mismatch; expected: '() -> ()', found: '(Int) -> Float' ```
19 KiB
19 KiB