mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Some constraint transformations require knowledge about what state constraint system is currently in e.g. `constraint generation`, `solving` or `diagnostics` to make a decision whether simplication is possible. Notable example is `keypath dynamic member lookup` which requires a presence of `applicable fn` constraint to retrieve some contextual information. Currently presence or absence of solver state is used to determine whether constraint system is in `constraint generation` or `solving` phase, but it's incorrect in case of `diagnoseFailureForExpr` which tries to simplify leftover "active" constraints before it can attempt type-check based diagnostics. To make this more robust let's introduce (maybe temporarily until type-check based diagnostics are completely obsoleted) a proper notion of "phase" to constraint system so it is always clear what transitions are allowed and what state constraint system is currently in. Resolves: rdar://problem/57201781
336 KiB
336 KiB