Commit d497e65
committed
SILGen: Fix assert when emitting re-abstraction thunk in edge case involving opaque return type
If we can see the underlying type of an opaque return type, and this
underlying type does not depend on the opaque return type's generic
signature, then we can end up in a situation where the lowered type
of a re-abstraction thunk is not generic, but the formal type is.
This would trigger an assertion failure. Check both the lowered type
and formal type for type parameters to cope with this.
- Fixes #86118.1 parent ea58732 commit d497e65
File tree
2 files changed
+22
-1
lines changed- lib/SIL/IR
- test/SILGen
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3605 | 3605 | | |
3606 | 3606 | | |
3607 | 3607 | | |
3608 | | - | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
3609 | 3611 | | |
3610 | 3612 | | |
3611 | 3613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments