FlatLang / Flat

(Deprecated) Soon-to-be legacy Flat compiler all in one
6 stars 0 forks source link

Null Bool should be checked for null value #420

Open BSteffaniak opened 2 years ago

BSteffaniak commented 2 years ago
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
    }
  }
}