Skip to content

The Basics: Force Unwrapping has incorrect info #401

@Adarsh-NP

Description

@Adarsh-NP

Location

https://docs.swift.org/swift-book/documentation/the-swift-programming-language/thebasics#Force-Unwrapping

Description

The line says:

When nil represents an unrecoverable failure, such as a programmer error or corrupted state, you can access the underlying value by adding an exclamation mark (!) to the end of the optional’s name.

There is no meaning of accessing underlying value without specifying its for the optional and not the nil value itself.

Correction

When nil represents an unrecoverable failure, such as a programmer error or corrupted state, you can access the underlying value of the optional by adding an exclamation mark (!) to the end of the optional’s name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content issueA problem in with the book's prose, code, or figures

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions