mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Detect that disjunction is going to be applied to arguments which don't provide any additional contextual information and allow only a single choice to be attempted in such case to avoid triggering exponential behavior in the solver. The problem is most visible with operators e.g. ```swift .foo == .bar || 1 == .baz ``` If neither member could be contextually determined and solver was allowed to attempt all of the overloads for `==` and `||` that would lead to exponential behavior (because each has 30+ overloads) and generation of hundreds of partial solutions. Resolves: rdar://problem/56400265
366 KiB
366 KiB