Skip to content

undefined method '+' for Nil (compile-time type is (Int32 | Nil)) #2

@marceloboeira

Description

@marceloboeira

For some reason, the compiler believes that the Some(Int32) could be Some(Int32 | Nil).

Example:

count = option(UnsafeIO::User.count).or_else(0)
puts "#{count + 1} on storage"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions