mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When trying to solve for the test case we attempt to simplify a value member constraint and it fails because we've bound the LHS type variable to an optional as a result of other constraints involving other type variables in the equivalence class of this type variable. We don't have enough information to directly deduce the non-optional type directly from other constraints involving this type variable. This change results in one interesting type checking anomoly. In Swift 3 mode, we now successfully typecheck an expression that we previously did not. Although the type checking technically makes sense given the type checking rules we have in place, it can be a bit surprising to users. Fortunately we emit a warning that calls out the surprising behavior of considering an expression unused. Fixes rdar://problem/30271695.
90 KiB
90 KiB