uhhh. why does this compile? <https://play.kotlin...
# announcements
n
i guess you expected it not to compile because of the newline?
r
Yup. it doesn't compile for strings. why does it compile for int (or numbers in general)
d
Looks like it's using the
unaryPlus
operator function but not using the result, in the IDE it gives a warning
👍 1
r
@Daniel Rampelt that's good. still scary though. what if dev misses. won't get caught in CI
n
that is pretty scary
s
Good reason to write a (unit) test... 😀
h
yeah, unary plus is one of those questionable additions to kotlin. has anyone ever had a use for it that seemed intuitive? the closest I can think of is absolute value