mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Turn on ‘as’ bridging on Linux."
This commit is contained in:
@@ -3627,6 +3627,11 @@ ConstraintSystem::simplifyBridgingConstraint(Type type1,
|
||||
Type type2,
|
||||
TypeMatchOptions flags,
|
||||
ConstraintLocatorBuilder locator) {
|
||||
// There's no bridging without ObjC interop, so we shouldn't have set up
|
||||
// bridging constraints without it.
|
||||
assert(TC.Context.LangOpts.EnableObjCInterop
|
||||
&& "bridging constraint w/o ObjC interop?!");
|
||||
|
||||
TypeMatchOptions subflags = getDefaultDecompositionOptions(flags);
|
||||
|
||||
/// Form an unresolved result.
|
||||
@@ -5071,11 +5076,14 @@ void ConstraintSystem::addExplicitConversionConstraint(
|
||||
coerceConstraint->setFavored();
|
||||
constraints.push_back(coerceConstraint);
|
||||
|
||||
// The source type can be explicitly converted to the destination type.
|
||||
Constraint *bridgingConstraint =
|
||||
Constraint::create(*this, ConstraintKind::BridgingConversion,
|
||||
fromType, toType, locatorPtr);
|
||||
constraints.push_back(bridgingConstraint);
|
||||
// Bridging.
|
||||
if (getASTContext().LangOpts.EnableObjCInterop) {
|
||||
// The source type can be explicitly converted to the destination type.
|
||||
Constraint *bridgingConstraint =
|
||||
Constraint::create(*this, ConstraintKind::BridgingConversion,
|
||||
fromType, toType, locatorPtr);
|
||||
constraints.push_back(bridgingConstraint);
|
||||
}
|
||||
|
||||
if (allowFixes && shouldAttemptFixes()) {
|
||||
Constraint *downcastConstraint =
|
||||
@@ -5086,8 +5094,8 @@ void ConstraintSystem::addExplicitConversionConstraint(
|
||||
}
|
||||
|
||||
addDisjunctionConstraint(constraints, locator,
|
||||
allowFixes ? RememberChoice
|
||||
: ForgetChoice);
|
||||
getASTContext().LangOpts.EnableObjCInterop && allowFixes ? RememberChoice
|
||||
: ForgetChoice);
|
||||
}
|
||||
|
||||
ConstraintSystem::SolutionKind
|
||||
|
||||
Reference in New Issue
Block a user