Skip to content

Commit 399e5b4

Browse files
committed
[cxx-interop] Add test for mutable std.optional.pointee
See #67648
1 parent 42cbacf commit 399e5b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Interop/Cxx/stdlib/use-std-optional.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ StdOptionalTestSuite.test("pointee") {
1212
let nonNilOpt = getNonNilOptional()
1313
let pointee = nonNilOpt.pointee
1414
expectEqual(123, pointee)
15+
16+
var modifiedOpt = getNilOptional()
17+
modifiedOpt.pointee = 777
18+
expectEqual(777, modifiedOpt.pointee)
1519
}
1620

1721
StdOptionalTestSuite.test("std::optional => Swift.Optional") {

0 commit comments

Comments
 (0)