[SR-5217] Protocol creates ambiguity around KeyPath roots #47793
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
Swift 4
Additional Detail from JIRA
md5: 6441524ea523bbc60a745d0143019e57
relates to:
Issue Description:
The following snippet throws a compiler error:
Those last few lines, where
user |> .id %~ incr
is written, work fine when%~
is defined in terms ofWritableKeyPath
directly. E.g.:The first, protocol-based example can be disambiguated using the full key-paths:
The text was updated successfully, but these errors were encountered: