You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fun foo(someInt:Int?){
val temp=someInt!!.toString()
...
}
This means that the parameter is actually supposed to be non-null, because it would cause a crash otherwise.
This also helps the IDE to detect bad usages from outside the function.
As for the opposite, not sure if it's needed (non-null parameter, which is treated as if it's nullable), but maybe for Java it's useful.
The text was updated successfully, but these errors were encountered:
AndroidDeveloperLB
changed the title
Request: add check for replacing nullable/non-nullable parameter of functions, when it seems it's used as such
Request: add inpsection for replacing nullable/non-nullable parameter of functions, when it seems it's used as such
Jan 1, 2023
AndroidDeveloperLB
changed the title
Request: add inpsection for replacing nullable/non-nullable parameter of functions, when it seems it's used as such
Request: add inspection for replacing nullable/non-nullable parameter of functions, when it seems it's used as such
Jan 1, 2023
For example:
This means that the parameter is actually supposed to be non-null, because it would cause a crash otherwise.
This also helps the IDE to detect bad usages from outside the function.
As for the opposite, not sure if it's needed (non-null parameter, which is treated as if it's nullable), but maybe for Java it's useful.
If this is too hard, I've also requested on IntelliJ:
https://youtrack.jetbrains.com/issue/IDEA-309644/Request-add-inspection-for-replacing-nullable-non-nullable-parameter-of-functions-when-it-seems-its-used-as-such
The text was updated successfully, but these errors were encountered: