Skip to content

Commit fb31a02

Browse files
committed
Use getParams() rather than getInput() in rewriteType().
1 parent 1c42ee2 commit fb31a02

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/SILGen/RValue.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -315,10 +315,12 @@ class RValue {
315315
// Allow function types to disagree about 'noescape'.
316316
if (auto lf = dyn_cast<FunctionType>(l)) {
317317
if (auto rf = dyn_cast<FunctionType>(r)) {
318-
return lf.getInput() == rf.getInput()
319-
&& lf.getResult() == rf.getResult()
320-
&& lf->getExtInfo().withNoEscape(false) ==
321-
lf->getExtInfo().withNoEscape(false);
318+
auto lParams = lf.getParams();
319+
auto rParams = rf.getParams();
320+
return AnyFunctionType::equalParams(lParams, rParams) &&
321+
lf.getResult() == rf.getResult() &&
322+
lf->getExtInfo().withNoEscape(false) ==
323+
lf->getExtInfo().withNoEscape(false);
322324
}
323325
}
324326
return false;

0 commit comments

Comments
 (0)