mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This is an ABI breaking change for Windows. `WCHAR` on Windows is mapped to `short` (`-fshort-wchar` makes it `unsigned short`). When C++ interop is enabled, `WCHAR` will be mapped to `wchar_t` which is then mapped to `short` (or `unsigned short` if `-fshort-wchar` is specified). Correct the mapping type to get the desired behaviour.
11 lines
594 B
Swift
11 lines
594 B
Swift
// RUN: %swift-ide-test -target x86_64-unknown-windows-msvc -print-module -module-to-print unicode -print-interface -source-filename %s -I %S/Inputs/unicode | %FileCheck %s -check-prefix CHECK-C
|
|
// RUN: %swift-ide-test -target x86_64-unknown-windows-msvc -enable-experimental-cxx-interop -print-module -module-to-print unicode -print-interface -source-filename %s -I %S/Inputs/unicode | %FileCheck %s -check-prefix CHECK-CXX
|
|
|
|
// REQUIRES: OS=windows-msvc
|
|
|
|
import unicode
|
|
|
|
// CHECK-C: typealias WCHAR = wchar_t
|
|
// CHECK-CXX: typealias WCHAR = CWideChar
|
|
// CHECK: var UNICODE_NULL: WCHAR { get }
|