File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
@@ -315,10 +315,12 @@ class RValue {
315
315
// Allow function types to disagree about 'noescape'.
316
316
if (auto lf = dyn_cast<FunctionType>(l)) {
317
317
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 );
322
324
}
323
325
}
324
326
return false ;
You can’t perform that action at this time.
0 commit comments