RepoJournal
Mobile platforms

Mobile platforms

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

Pick a date

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.

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

FAQ

What changed 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.
What should Mobile platforms teams do about it?
Sync Swift compiler if you maintain `@backDeployed` APIs or embedded Swift projects • Monitor Kotlin/Atomicfu for the next release with KT-69305 included
Which Mobile platforms repositories shipped on June 1, 2026?
apple/swift, JetBrains/kotlin

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.