Skip to content

Conversation

@DougGregor
Copy link
Member

Apply the same is-generic check to initializers that we apply to
functions when establishing basic override compatibility. This is a
simple optimization for master, but fixes a crasher for Swift 3.1.

Fixes SR-4059

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@jrose-apple
Copy link
Contributor

This seems incorrect; what if you have class IntList: ListBase<Int>?

…izers.

Apply the same is-generic check to initializers that we apply to
functions when establishing basic override compatibility. This is a
simple optimization for master, but fixes a crasher for Swift 3.1.

Fixes SR-4059.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member Author

This is about the generic parameters on the initializer itself; it's not checking the generic parameters of the enclosing class.

You are correct that the implementation is wrong: one could override a concrete initializer with a generic one. But we need a bit more work to get there.

@DougGregor
Copy link
Member Author

Hmm. Maybe the name isGeneric() is misleading.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

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