RepoJournal
Mobile platforms

Mobile platforms

Flutter, Swift, and Kotlin - the mobile platforms developers ship on

Keep up with Mobile platforms in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Mobile Full archive →

The Wire · Showcase

SWIFT COMPILER FIXES NESTED FUNCTION CORRUPTION IN BACKDEPLOYED CODE

By RepoJournal · Filed · About Mobile platforms

Swift's SILGen pipeline was silently emitting duplicate nested functions when processing `@backDeployed` declarations, causing build failures that looked impossible to debug.

The top priority fix lands in Swift's SILGen phase, which handles intermediate language generation [1]. When a function marked `@backDeployed` gets compiled, its body is emitted twice - once for the original and once for the fallback that runs on older OS versions. Named nested functions inside that body were getting duplicate definitions, while closures worked fine because they already had deduplication logic. This is fixed now, unblocking developers using `@backDeployed` with local function declarations.

On the embedded Swift front, a false error is resolved that was rejecting legitimate generic specialization loops [2]. The compiler now allows specialization chains up to a depth of 10 instead of 1, which matches real-world usage patterns without opening the door to infinite loops. This removes friction from embedded projects that were hitting artificial constraints.

Two additional ownership violations surfaced in the inliner when handling dead-end control flow [3]. The lifetime completion ordering issue caused `end_borrow` to be inserted after `destroy_value [dead_end]` on the same value, violating Swift's ownership model. This is now corrected.

On the Kotlin side, Atomicfu's type parameter generation has been fixed to prevent out-of-scope references [4], addressing KT-69305 and clearing the path for atomic operations in more complex generic contexts.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] SILGen: Fix 'multiple definitions' error for funcs nested in `@backDeployed` funcs ↗ apple/swift
  2. [2] embedded: allow finite specialization loops up to a larger limit ↗ apple/swift
  3. [3] Inliner: fix a ownership violation when inlining a begin_apply into a dead-end block ↗ apple/swift
  4. [4] [Atomicfu] Fix out-of-scope type parameters generation JetBrains/kotlin

Quick answers

What shipped in Mobile platforms on June 1, 2026?
Swift's SILGen pipeline was silently emitting duplicate nested functions when processing `@backDeployed` declarations, causing build failures that looked impossible to debug. In total, 5 commits and 3 pull requests landed.
Who contributed to Mobile platforms on June 1, 2026?
2 developers shipped this update, including tshortli and eeckstein.
What were the notable Mobile platforms updates?
SILGen: Fix 'multiple definitions' error for funcs nested in `@backDeployed` funcs, embedded: allow finite specialization loops up to a larger limit, and Inliner: fix a ownership violation when inlining a begin_apply into a dead-end block.

More from Mobile platforms

Daily updates, in your inbox

Follow Mobile platforms

Keep up with Mobile platforms in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?