ipp: suggestion: initialize with default
Hi,
I'd like an intention just after the definition of a variable without immediate initialization.
--> intention: initialize with default
or maybe eben after the 'return s'-statement with the error
"s may not have been initialized"
--> intention: initialize s with default
What do you think?
请先登录再写评论。
I like this one. To trigger on the declaration, would be easy. To do it on the possibly uninitionalized use, I'd have to reimplement the data-flow analysis that IDEA does to flag an uninitialized use, which is doable if trickier. (Certainly easier than the incredible pains in the ass that convert-if-to-switch and convert-switch-to-if are turning out to be). I'll slot this one for 0.4, probably about a month from now.
Thanks for the idea
--Dave