Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sema: Generalize heuristic in favoredOverDisjunction() #76318

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 6, 2024

This fixes a too complex test case that was originally added in 2507a31.

lib/Sema/CSBindings.cpp Outdated Show resolved Hide resolved
return hasConversions(pair->second);
} else if (auto eltTy = ConstraintSystem::isSetType(structTy)) {
return hasConversions(*eltTy);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit worried that for Array, Dictionary, Set if we are too aggressive in binding we might lose viable bindings to bridgeable types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll see what happens :) Validation tests did pass...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞

@slavapestov slavapestov force-pushed the favored-over-disjunction-heuristic branch from e8b1876 to 73aa029 Compare September 9, 2024 15:19
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

return hasConversions(pair->second);
} else if (auto eltTy = ConstraintSystem::isSetType(structTy)) {
return hasConversions(*eltTy);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞

@swiftlang swiftlang deleted a comment from xedin Sep 13, 2024
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 6fb66db into swiftlang:main Sep 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants