Skip to content

Conversation

@AnthonyLatsis
Copy link
Contributor

@AnthonyLatsis AnthonyLatsis commented Apr 1, 2019

This proposal is about getting rid of the restriction on attaching where clauses to declarations that inherit the surrounding generic environment, but themselves do not introduce generic parameters. Only declarations that can already be generic fall under this enhancement.

class Foo<T> {
  func foo() where T: Equatable { ... }
}

Implementation: #23489

> protocol P {
> // error: Instance method requirement 'foo(arg:)' cannot add constraint 'Self: Equatable' on 'Self'
> func foo() where Self: Equatable
> }

This comment was marked as resolved.

@AnthonyLatsis
Copy link
Contributor Author

@DougGregor Would you like to manage this?

@AnthonyLatsis
Copy link
Contributor Author

@tkremenek Is there an opportunity to stage this for review in the near future?

@jckarter jckarter merged commit be27994 into swiftlang:master Oct 11, 2019
jckarter added a commit that referenced this pull request Oct 11, 2019
@AnthonyLatsis AnthonyLatsis deleted the where-clause-nongeneric branch August 19, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants