Skip to content

Null Bool should be checked for null value #420

Open
@BSteffaniak

Description

@BSteffaniak
let Bool _showPrefix = null
let Bool showPrefix {
  get {
    return if (_showPrefix != null) {
      _showPrefix
    } else {
      DEFAULT_SHOW_PREFIX
    }
  }
}

should be able to be written as:

let Bool _showPrefix = null
let Bool showPrefix {
  get {
    return if (_showPrefix) {
      _showPrefix
    } else {
      DEFAULT_SHOW_PREFIX
    }
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions