forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sema: Fix convenience init delegation to a convenience init in a gene…
…ric base class While in the constraint system, the delegation is modeled as returning an instance of the derived class, in the AST we type the reference as returning an instance of the base class, and insert a downcast, because in SILGen we're calling the base class initializer which is typed as returning the base class. This bit of fixup logic wasn't happening if the base class was generic, and so we were not inserting the cast, which would crash in SILGen with an assert. Fixes <rdar://problem/31000248>.
- Loading branch information
1 parent
fedf6b1
commit 19b12aa
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mpiler_crashers_2/0085-rdar31000248.swift → ..._crashers_2_fixed/0085-rdar31000248.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters