Skip to content

Commit 3a849ab

Browse files
committed
Flip the bincompat switches on the tightened casting semantics
so the new behavior is always enabled by default on all OSes. (This may change depending on whether anyone is actually depending on this behavior.)
1 parent 00f49a9 commit 3a849ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/runtime/Bincompat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ bool useLegacyOptionalNilInjectionInCasting() {
189189
// by that protocol.
190190
bool useLegacyObjCBoxingInCasting() {
191191
#if BINARY_COMPATIBILITY_APPLE
192-
return true; // For now, continue using the legacy behavior on Apple OSes
192+
return false; // For now, always use the new behavior on Apple OSes
193193
#else
194194
return false; // Always use the new behavior on non-Apple OSes
195195
#endif
@@ -209,7 +209,7 @@ bool useLegacyObjCBoxingInCasting() {
209209

210210
bool useLegacySwiftValueUnboxingInCasting() {
211211
#if BINARY_COMPATIBILITY_APPLE
212-
return true; // For now, continue using the legacy behavior on Apple OSes
212+
return false; // For now, always use the new behavior on Apple OSes
213213
#else
214214
return false; // Always use the new behavior on non-Apple OSes
215215
#endif

0 commit comments

Comments
 (0)