Fix _bridgeToObjectiveC lookup code in optimizeBridgedSwiftToObjCCast

Previously it assumed that if we succeed in looking up the method in the current
module we must be able to request a definition (vs a declaration).

This is not true. It could be that we had declared the type in a different
module. Always ask for a declaration.

rdar://27547957
This commit is contained in:
Arnold Schwaighofer
2016-07-27 10:22:37 -07:00
parent 8c7e75afa0
commit c65e1a31e3
4 changed files with 6 additions and 15 deletions

View File

@@ -12,9 +12,6 @@
// RUN: %line-directive %t/main.swift -- %target-run %t/Set
// REQUIRES: executable_test
// rdar://27547957
// XFAIL: swift_test_mode_optimize
import StdlibUnittest
import StdlibCollectionUnittest