Skip to content

iOS: a protocol's optional requirement stays optional where an adopting protocol declares it again - #275

Merged
Fausto95 merged 1 commit into
mainfrom
ios-inherited-optional
Oct 14, 2026
Merged

Fausto95 merged 1 commit into
mainfrom
ios-inherited-optional

Conversation

@Fausto95

Copy link
Copy Markdown
Owner

A Lucent class implementing an iOS protocol no longer has to implement optional requirements that come from the protocols that protocol adopts.

URLSessionDownloadDelegate adopts URLSessionTaskDelegate and URLSessionDelegate. Its declaration repeats what both branches declare, tagged @lucentInherited, and the repeated members lost their optionality: class Downloads implements URLSessionDownloadDelegate failed with TS2720 unless it also implemented urlSession_didBecomeInvalidWithError and urlSession_didReceive_completionHandler. Found by T137's background download, compiled against the real iOS SDK on CI.

  • dts.ts: an inherited overload keeps its method's optional.
  • dts-audit.test.ts: a fixture with Foundation's shape.

Stacked on #274.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KaXTpjxQL34i1B21Jt4UMB


Generated by Claude Code

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

Deployment failed for project website with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/faustino-kialungilas-projects?upgradeToPro=build-rate-limit

@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 9b0ab84 to 359512a Compare October 14, 2026 10:45
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from 5bccc3b to e2ac3f6 Compare October 14, 2026 10:45
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

Deployment failed for project lucent with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/faustino-kialungilas-projects?upgradeToPro=build-rate-limit

@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 359512a to b36c796 Compare October 14, 2026 10:46
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from e2ac3f6 to 823d74b Compare October 14, 2026 10:46
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from b36c796 to 7cc121c Compare October 14, 2026 11:01
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from 823d74b to 304bfa3 Compare October 14, 2026 11:01
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 7cc121c to 451f0e9 Compare October 14, 2026 11:03
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from 304bfa3 to f0dfb42 Compare October 14, 2026 11:03
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 451f0e9 to 3ac12bf Compare October 14, 2026 11:04
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from f0dfb42 to a445cb6 Compare October 14, 2026 11:04
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 3ac12bf to 5c4a989 Compare October 14, 2026 11:04
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from a445cb6 to 1f5f3ea Compare October 14, 2026 11:04
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 5c4a989 to 7abcfed Compare October 14, 2026 11:42
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from 1f5f3ea to a2af99b Compare October 14, 2026 11:42
@Fausto95
Fausto95 force-pushed the ci-jvm-signal-warning branch from 7abcfed to 0b36365 Compare October 14, 2026 16:31
…ng protocol declares it again

URLSessionDownloadDelegate adopts URLSessionTaskDelegate and URLSessionDelegate,
and declares again what both branches declare: URLSessionDelegate's optional
requirements came out required, so a delegate had to implement them all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaXTpjxQL34i1B21Jt4UMB
@Fausto95
Fausto95 changed the base branch from ci-jvm-signal-warning to main October 14, 2026 16:32
@Fausto95
Fausto95 force-pushed the ios-inherited-optional branch from a2af99b to 509e1ac Compare October 14, 2026 16:32
@Fausto95
Fausto95 merged commit 667de3c into main Oct 14, 2026
@Fausto95
Fausto95 deleted the ios-inherited-optional branch October 15, 2026 08:47
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