[SR-10202] Trying to write through key path on private(set) var gives bad error and fixit #52602
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
key paths
Feature: key paths (both native and Objective-C)
type checker
Area → compiler: Semantic analysis
Environment
Xcode 10.2 (10E125) on macOS 10.14.3 (18D109) in a macOS playground
Additional Detail from JIRA
md5: 3b0684655bd95e8c0ba4b082046ebf2a
Issue Description:
This produces the following output when compiled:
The first error is good: it's true that you can't assign through a read-only key path.
However, the fixit is not useful at all. Changing `let` to `var` doesn't actually fix anything.
The text was updated successfully, but these errors were encountered: