Open
Description
Previous ID | SR-485 |
Radar | rdar://problem/20462344 |
Original Reporter | @lilyball |
Type | Bug |
Environment
Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Additional Detail from JIRA
Votes | 3 |
Component/s | Compiler |
Labels | Bug, ClangImporter, Macros |
Assignee | None |
Priority | Medium |
md5: 4f56b5e5a3db09cb27d77f8e3f9984fc
relates to:
- SR-141 Complex C header files macros are ignored
- SR-2402 Clang importer should import nullary function-like macros
Issue Description:
It turns out that NSURLResponseUnknownLength
isn't exposed to Swift because the macro definition doesn't match Swift's rules for importable macros. The definition is:
#define NSURLResponseUnknownLength ((long long)-1)
This looks relatively straightforward, and should be simple enough that Swift can support. In general, any macro whose definition is the form ((SomeType)literal)
should be importable.