Skip to content

Commit 7bc3dfb

Browse files
committed
[Constraint solver] Ignore type declarations in "common type" computation.
Type declarations are handled somewhat specially by the constraint solver when applied, so temporarily exclude them from the "common type" computation.
1 parent 90e5957 commit 7bc3dfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,10 @@ static Type getEffectiveOverloadType(const OverloadChoice &overload) {
14841484

14851485
auto decl = overload.getDecl();
14861486

1487+
// Ignore type declarations.
1488+
if (isa<TypeDecl>(decl))
1489+
return Type();
1490+
14871491
// Retrieve the interface type.
14881492
auto type = decl->getInterfaceType();
14891493
if (!type) {

0 commit comments

Comments
 (0)