Skip to content

Commit ab230b9

Browse files
committed
Revert "[Tests] NFC: Add a test-case for invalid optional promotion"
This reverts commit 6b287bf.
1 parent 1c54f4b commit ab230b9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

test/Constraints/optional.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -598,19 +598,3 @@ do {
598598
test(x!) // expected-error {{no exact matches in call to local function 'test'}}
599599
// expected-error@-1 {{cannot force unwrap value of non-optional type 'Double'}}
600600
}
601-
602-
// Diagnose cases of invalid chaining when parameter is not optional based on context.
603-
do {
604-
class Test {
605-
var value: Int = 42
606-
}
607-
608-
class Container {
609-
let test: Test = Test()
610-
611-
func loop() {
612-
[test].forEach { $0?.value = 42 }
613-
// expected-error@-1 {{cannot use optional chaining on non-optional value of type 'Test'}}
614-
}
615-
}
616-
}

0 commit comments

Comments
 (0)