mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ConstraintSolver::coerceToRValue() missed a bunch of cases where we should be dealing with lvalues, e.g., tuples, "try" expressions, and so on. Extend TypeChecker::coerceToRValue() to deal with the expression type side-tables and ConstraintSolver::coerceToRValue() to it. Fixes rdar://problem/32700180, a crash-on-valid.
20 lines
246 B
Swift
20 lines
246 B
Swift
// RUN: %target-swift-frontend %s -emit-ir
|
|
// REQUIRES: objc_interop
|
|
|
|
func f(_: AnyObject?) { }
|
|
|
|
class C {
|
|
private var a: Int
|
|
private var b: Int
|
|
|
|
func test() {
|
|
f((self.a, self.b) as AnyObject)
|
|
}
|
|
|
|
init() {
|
|
a = 0
|
|
b = 0
|
|
}
|
|
}
|
|
|