Wow, calm down. Right now he just pointed out that it’s actually a compiler warning and not just an IDE inspection.
Also it’s not as simple as you think. The grammar change you proposed does not solve the problem without creating new ones. If you restrict just the use of
Nothing you can no longer use
TODO() in your code the way you can right now.
if(someReareCondition) return TODO("fix later, I don't care right now")
So you actually need to restrict just the usage of
continue (I think those are all keyword expressions that are of type
Nothing), while ignoring all functions that return
I’m not a compiler guy, but I think this would be much more complicated than just changing a warning into an error.
Also you still did not answer my question? Is there any real expression anyone would ever write that could lead to a problem. No tool can stop you writing bad code. The compiler detects the problem and warns you about it. I don’t think restricting
Nothing just to change this from a warning to an error is worth destroying the usability of
Btw, I don’t think you will get the kotlin team to change anything by yelling at them. In my experience with KEEP and this forum, reasonable arguments do the trick just fine.