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
@@ -6110,7 +6110,7 @@ ConstructorDecl *SwiftDeclConverter::importConstructor(
6110
6110
6111
6111
// Look for other imported constructors that occur in this context with
6112
6112
// the same name.
6113
- Type allocParamType = oldFnType->getInput ();
6113
+ auto allocParams = oldFnType->getParams ();
6114
6114
bool ignoreNewExtensions = isa<ClassDecl>(dc);
6115
6115
for (auto other : ownerNominal->lookupDirect (importedName.getDeclName (),
6116
6116
ignoreNewExtensions)) {
@@ -6127,12 +6127,12 @@ ConstructorDecl *SwiftDeclConverter::importConstructor(
6127
6127
// If the types don't match, this is a different constructor with
6128
6128
// the same selector. This can happen when an overlay overloads an
6129
6129
// existing selector with a Swift-only signature.
6130
- Type ctorParamType = ctor->getInterfaceType ()
6131
- ->castTo <AnyFunctionType>()
6132
- ->getResult ()
6133
- ->castTo <AnyFunctionType>()
6134
- -> getInput ();
6135
- if (!ctorParamType-> isEqual (allocParamType )) {
6130
+ auto ctorParams = ctor->getInterfaceType ()
6131
+ ->castTo <AnyFunctionType>()
6132
+ ->getResult ()
6133
+ ->castTo <AnyFunctionType>()
6134
+ -> getParams ();
6135
+ if (!AnyFunctionType::equalParams (ctorParams, allocParams )) {
6136
6136
continue ;
6137
6137
}
6138
6138
0 commit comments