9223 (1) [Avatar] Offline
#1
The code example includes this line:

val n = e as Num

The IDE suggests removing the unnecessary cast.

Just need:

return e.value

EDIT: My bad, you use that line to explain an explicit cast a few sentences later. Please feel free to delete this post.