FlatLang / Flat

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

Add support for throwing exceptions in ternary #355

Open BSteffaniak opened 7 years ago

BSteffaniak commented 7 years ago

e.g.

if (hasNext) {
    return position++
}

throw new NoSuchElementException()

could be written as

hasNext ? position++ : throw new NoSuchElementException()