yandex / yandex/implicits

Capture list in #withImplicits blocked by Swift compiler bug

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
43
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Description

Using capture lists with #withImplicits macro fails due to a Swift compiler bug with type inference for macro-expanded closures.

Example

let x = 42
_ = #withImplicits { [x] scope in
  @Implicit() var v1: Int32
  return x
}

This fails with: type of expression is ambiguous without a type annotation

Related

Status

Test added but disabled with #if NO_COMPILE until Swift fixes the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the capture-list example in the issue and the linked Swift compiler report #86871, then inspect the test mentioned as disabled with #if NO_COMPILE. Done would require the compiler bug to be resolved and the capture-list test to compile and pass without that guard.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.