mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The PR https://github.com/swiftlang/swift/pull/77857 added windows-specific workaround for https://github.com/swiftlang/swift/issues/77856, that happened after https://github.com/swiftlang/swift/pull/77843. Unfortunately this caused a new issue on windows - https://github.com/swiftlang/swift/issues/78119. It looks like windows is suffering from a similar serialization issue as libstdc++, although its even more complex as the callAsFunction is not only a derived function from a base class, the base class although has a static call operator. In any case, the libstdc++ callAsFunction deserialization fix should align with the static operator () deserialization too, so for now make windows use the same workaround as other platforms to avoid the deserialization crash (77856). This change was tested on i686 windows too, ensuring that IR verifier crash no longer happens
21 lines
543 B
Swift
21 lines
543 B
Swift
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=default -Xcc -std=c++20 -O)
|
|
//
|
|
// REQUIRES: executable_test
|
|
|
|
// Tests optimizations related to CxxStdlib.
|
|
|
|
import StdlibUnittest
|
|
import CxxStdlib
|
|
import StdStringAndVector
|
|
|
|
var StdStringOptTestSuite = TestSuite("StdStringWithOpts")
|
|
|
|
StdStringOptTestSuite.test("std::string with Hashable conformance optimized") {
|
|
let item = get_item()
|
|
let dict = Dictionary(uniqueKeysWithValues: zip(item.keys, item.values).lazy)
|
|
|
|
expectEqual(dict.count, 0)
|
|
}
|
|
|
|
runAllTests()
|