Skip to content

Commit e0d7f52

Browse files
committed
[cxx-interop] Adjust a test
This prevents a name conflict between a Swift `protocol CxxOptional` and a C++ `using CxxOptional`.
1 parent c7e3dc0 commit e0d7f52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/Interop/Cxx/stdlib/Inputs/std-optional.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
#include <optional>
55

6-
using CxxOptional = std::optional<int>;
6+
using StdOptionalInt = std::optional<int>;
77

8-
inline CxxOptional getNonNilOptional() { return {123}; }
8+
inline StdOptionalInt getNonNilOptional() { return {123}; }
99

10-
inline CxxOptional getNilOptional() { return {std::nullopt}; }
10+
inline StdOptionalInt getNilOptional() { return {std::nullopt}; }
1111

1212
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_STD_OPTIONAL_H

0 commit comments

Comments
 (0)