Jacques Smuts
06/10/2019, 10:34 AM!!
operator seems to be a frequent source of issues. Has anyone here ever considered turning !!
into a compiler-error lint rule?Sławomir Onyszko
06/10/2019, 10:40 AMJacques Smuts
06/10/2019, 10:53 AMLeoColman
06/10/2019, 12:05 PMval foo = getPossibleNullable() ?: throw IllegalStateException("Shouldn't be null")
!!
for that scenariostreetsofboston
06/10/2019, 12:14 PM!!
shouldn't be a Lint warning, but you should carefully examine your code why you'd need it! Often it's a code-smell, but sometimes there's no other way 😀Mike
06/10/2019, 1:09 PMJacques Smuts
06/10/2019, 1:11 PMJessie
06/10/2019, 3:27 PM!!
operator, so in our code review we are really aware about it. We prefer to have a null check before using an expression that is coming from Java and might need that dangerous operator.