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

Add changelog entry for nested generic types

  • Loading branch information...
slavapestov committed Nov 2, 2016
commit 5564a57668e86f325e2c005b57bad0e24ee24a66
View
@@ -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 {}

This comment has been minimized.

@jrose-apple

jrose-apple Nov 18, 2016

Member

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

@jrose-apple

jrose-apple Nov 18, 2016

Member

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

This comment has been minimized.

@slavapestov
@slavapestov

slavapestov Nov 18, 2016

Member

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: