Skip to content

Commit 2f10d49

Browse files
committed
[Tests] NFC: Expand init accessor with nonmutating set coverage
(cherry picked from commit 3414609)
1 parent 0317f65 commit 2f10d49

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

test/Interpreter/init_accessors.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ do {
865865

866866
struct TestNonMutatingSetNoDefault {
867867
var _count: Int
868+
var _other: String = ""
868869

869870
var count: Int {
870871
@storageRestrictions(initializes: _count)
@@ -917,7 +918,7 @@ do {
917918
// CHECK-NEXT: test-nonmutating-set-2: TestNonMutatingSetDefault(_count: 0)
918919
// CHECK-NEXT: init accessor is called: -1
919920
// CHECK-NEXT: nonmutating set called: 0
920-
// CHECK-NEXT: test-nonmutating-set-3: TestNonMutatingSetNoDefault(_count: -1)
921+
// CHECK-NEXT: test-nonmutating-set-3: TestNonMutatingSetNoDefault(_count: -1, _other: "")
921922
// CHECK-NEXT: init accessor is called: 42
922923
// CHECK-NEXT: nonmutating set called: 0
923924
// CHECK-NEXT: test-nonmutating-set-4: TestNonMutatingSetCustom(_count: 42)

test/SILOptimizer/init_accessor_raw_sil_lowering.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,6 @@ func test_handling_of_nonmutating_set() {
423423
self.count = 0
424424
}
425425
}
426-
<<<<<<< Updated upstream
427-
=======
428426

429427
struct TestWithStored {
430428
private var _count: Int
@@ -468,5 +466,4 @@ func test_handling_of_nonmutating_set() {
468466
self.count = value
469467
}
470468
}
471-
>>>>>>> Stashed changes
472469
}

0 commit comments

Comments
 (0)