Skip to content

Update changelog following #6531 (import of indirect fields) #6728

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

Merged
merged 1 commit into from
Jan 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,39 @@ CHANGELOG
Swift 3.1
---------

* Indirect fields from C structures and unions are now always imported, while
they previously weren't imported if they belonged to an union. This is done by
naming anonymous fields. For example:

```c
typedef struct foo_t {
union {
int a;
double b;
};
} foo_t;
```

Get imported as:

```swift
struct foo_t {
struct __Unnamed_union___Anonymous_field0 {
var a : Int { get set }
var b : Double { get set }
}
var __Anonymous_field0 : foo_t.__Unnamed_union___Anonymous_field0

// a and b are computed properties accessing the content of __Anonymous_field0
var a : Int { get set }
var b : Double { get set }
}
```

Since new symbols are exposed from imported structure/unions, this may conflict
with existing code that extended C types in order to provide their own accessors
to the indirect fields.

* The `withoutActuallyEscaping` function from [SE-0103][] has been implemented.
To pass off a non-escaping closure to an API that formally takes an
`@escaping` closure, but which is used in a way that will not in fact
Expand Down