`ViewModifiers` with generics fail to build
Open
Nobody has claimed this yet.
fuse
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
When having:
struct PerformEquatableBlockingModifier<T: Equatable>: ViewModifier { ... }
I'm getting this on skip android build:
/Users/piercifani/Developer/BSWInterfaceKit/.build/plugins/outputs/bswinterfacekit/BSWInterfaceKit/destination/skipstone/SkipBridgeGenerated/BlockingTask_Bridge.swift:78:93: error: missing argument label 'content:' in call
76 | nonisolated func toTypeErased() -> AnyObject {
77 | let typeErased = PerformEquatableBlockingModifier_TypeErased(self)
78 | typeErased.body = { [unowned typeErased] in (typeErased.genericvalue as! Self).body($0) }
| `- error: missing argument label 'content:' in call
79 | typeErased.Java_initState_taskError = { [unowned typeErased] in (typeErased.genericvalue as! Self).Java_initState_taskError() }
80 | typeErased.Java_syncState_taskError = { [unowned typeErased] in (typeErased.genericvalue as! Self).Java_syncState_taskError(support: $0) }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the skip android build reproduction using a generic ViewModifier, then inspect the generated .build/plugins/outputs/bswinterfacekit/BSWInterfaceKit/destination/skipstone/SkipBridgeGenerated/BlockingTask_Bridge.swift around line 78. Determine why the generated body call omits the content: label; done means the Android build succeeds for the reported generic modifier.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, swift
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100