Skip to content

Commit e8e292c

Browse files
committed
Replace uses of getInput() in TypeJoinMeet.cpp.
1 parent defc293 commit e8e292c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/AST/TypeJoinMeet.cpp

Lines changed: 5 additions & 6 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
@@ -324,9 +324,8 @@ CanType TypeJoin::visitFunctionType(CanType second) {
324324
if (firstExtInfo.withNoEscape(false) != secondExtInfo.withNoEscape(false))
325325
return Unimplemented;
326326

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()))
330329
return Unimplemented;
331330

332331
auto firstResult = firstFnTy->getResult()->getCanonicalType();
@@ -340,8 +339,8 @@ CanType TypeJoin::visitFunctionType(CanType second) {
340339
if (secondFnTy->getExtInfo().isNoEscape())
341340
extInfo = extInfo.withNoEscape(true);
342341

343-
return FunctionType::get(firstFnTy->getInput(), result,
344-
extInfo)->getCanonicalType();
342+
return FunctionType::get(firstFnTy->getParams(), result, extInfo)
343+
->getCanonicalType();
345344
}
346345

347346
CanType TypeJoin::visitGenericFunctionType(CanType second) {

0 commit comments

Comments
 (0)