Skip to content
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

Remove -enable-experimental-nested-generic-types flag #5600

Merged
merged 8 commits into from Nov 18, 2016
Prev Previous commit
Next Next commit
Add changelog entry for nested generic types
  • Loading branch information
slavapestov committed Nov 18, 2016
commit 5564a57668e86f325e2c005b57bad0e24ee24a66
20 changes: 20 additions & 0 deletions CHANGELOG.md
Expand Up @@ -20,6 +20,26 @@ CHANGELOG
Swift 3.1
---------

* [SR-1446](https://bugs.swift.org/browse/SR-1446)

Nested types may now appear inside generic types, and nested types may have their own generic parameters:

```swift
struct OuterNonGeneric {
struct InnerGeneric<T> {}
}

struct OuterGeneric<T> {
struct InnerNonGeneric {}

struct InnerGeneric<T> {}
}

extension OuterNonGeneric.InnerGeneric {}
extension OuterGeneric.InnerNonGeneric {}
extension OuterGeneric.InnerGeneric {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I constrain the outer generic parameter? (if it has a different name)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

```

* [SR-1009](https://bugs.swift.org/browse/SR-1009):

Constrained extensions allow same-type constraints between generic parameters and concrete types. This enables you to create extensions, for example, on `Array` with `Int` elements:
Expand Down