Revert "Fix one source of exponential behavior in the type checker."

This reverts commit 1efafbcd9b because
results in a regression in source compatibility with Swift 3.

It also adds a test demonstrating what was broken by the change.

I will take another look at fixing the exponential behavior that this
was attempting to fix.

Fixes rdar://problem/29977523.
This commit is contained in:
Mark Lacey
2017-01-15 22:02:55 -07:00
parent 7dd2489151
commit fc73e79b74
2 changed files with 62 additions and 50 deletions

View File

@@ -164,3 +164,15 @@ SR_3248().callback("test") // expected-error {{cannot convert value of type 'St
_? = nil // expected-error {{'nil' requires a contextual type}}
_?? = nil // expected-error {{'nil' requires a contextual type}}
infix operator !====
func !====(_ lhs: AnyObject?, _ rhs: AnyObject?) -> Bool { return false }
func calleeRdar29977523(_ lhs: AnyObject?, _ rhs: AnyObject?) { }
func rdar29977523(lhs: AnyObject?!, rhs: AnyObject?) {
if lhs !==== rhs { }
calleeRdar29977523(lhs, rhs)
}