We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1844578 commit cdf5c5cCopy full SHA for cdf5c5c
test/Constraints/optional.swift
@@ -438,6 +438,7 @@ func sr_12309() {
438
_ = nil! // expected-error {{'nil' literal cannot be force unwrapped}}
439
_ = (nil!) // expected-error {{'nil' literal cannot be force unwrapped}}
440
_ = (nil)! // expected-error {{'nil' literal cannot be force unwrapped}}
441
+ _ = ((nil))! // expected-error {{'nil' literal cannot be force unwrapped}}
442
_ = nil? // expected-error {{value of optional type 'Optional<_>' must be unwrapped to a value of type '_'}}
443
// expected-note@-1 {{coalesce using '??' to provide a default when the optional value contains 'nil'}}
444
// expected-note@-2 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
0 commit comments