File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ SILType SILBuilder::getPartialApplyResultType(
103
103
for (auto yield : FTI->getYields ()) {
104
104
needsSubstFunctionType |= yield.getInterfaceType ()->hasTypeParameter ();
105
105
}
106
+ if (FTI->hasErrorResult ()) {
107
+ needsSubstFunctionType
108
+ |= FTI->getErrorResult ().getInterfaceType ()->hasTypeParameter ();
109
+ }
106
110
107
111
SubstitutionMap appliedSubs;
108
112
if (needsSubstFunctionType) {
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-emit-silgen -verify %s
2
+
3
+ func consume_a_pointer( x: inout Int ) { }
4
+
5
+ func func_that_rethrows< E: Error > ( initializingWith callback: ( ) throws ( E ) -> Void ) throws ( E) {
6
+ }
7
+
8
+ public func foo( ) {
9
+ var pk = 42
10
+ func_that_rethrows ( ) {
11
+ consume_a_pointer ( x: & pk)
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments