We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 71c8c33 + 9343446 commit f1dde51Copy full SHA for f1dde51
lib/SILGen/SILGenBridging.cpp
@@ -1818,7 +1818,8 @@ void SILGenFunction::emitNativeToForeignThunk(SILDeclRef thunk) {
1818
1819
auto directResults = substConv.getDirectSILResults();
1820
auto hasMultipleDirectResults
1821
- = std::next(directResults.begin()) != directResults.end();
+ = !directResults.empty() &&
1822
+ std::next(directResults.begin()) != directResults.end();
1823
1824
for (unsigned paramI : indices(completionTy->getParameters())) {
1825
if (errorParamIndex && paramI == *errorParamIndex) {
0 commit comments