File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
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
@@ -324,9 +324,8 @@ CanType TypeJoin::visitFunctionType(CanType second) {
324
324
if (firstExtInfo.withNoEscape (false ) != secondExtInfo.withNoEscape (false ))
325
325
return Unimplemented;
326
326
327
- // FIXME: Properly compute parameter types from getParams().
328
- if (firstFnTy->getInput ()->getCanonicalType () !=
329
- secondFnTy->getInput ()->getCanonicalType ())
327
+ if (!AnyFunctionType::equalParams (firstFnTy->getParams (),
328
+ secondFnTy->getParams ()))
330
329
return Unimplemented;
331
330
332
331
auto firstResult = firstFnTy->getResult ()->getCanonicalType ();
@@ -340,8 +339,8 @@ CanType TypeJoin::visitFunctionType(CanType second) {
340
339
if (secondFnTy->getExtInfo ().isNoEscape ())
341
340
extInfo = extInfo.withNoEscape (true );
342
341
343
- return FunctionType::get (firstFnTy->getInput (), result,
344
- extInfo) ->getCanonicalType ();
342
+ return FunctionType::get (firstFnTy->getParams (), result, extInfo)
343
+ ->getCanonicalType ();
345
344
}
346
345
347
346
CanType TypeJoin::visitGenericFunctionType (CanType second) {
You can’t perform that action at this time.
0 commit comments