Edoardo Luppi
01/25/2024, 9:43 AM_localctx!!.value = _localctx.exp!!.value
where _localctx!!
reports a UNNECESSARY_NOT_NULL_ASSERTION
K/JS will still output:
ensureNotNull(_localctx).value_1 = ensureNotNull(_localctx.exp_1).value_1;
Worth opening an issue for an optimization?Vampire
01/25/2024, 9:51 AMEdoardo Luppi
01/25/2024, 10:02 AMUNNECESSARY_NOT_NULL_ASSERTION
is present.Edoardo Luppi
01/25/2024, 10:03 AMArtem Kobzar
01/25/2024, 10:42 AMEdoardo Luppi
01/25/2024, 10:42 AMVampire
01/25/2024, 10:48 AMEdoardo Luppi
01/25/2024, 11:41 AMEdoardo Luppi
01/25/2024, 11:42 AMjw
01/25/2024, 6:41 PM?.
or null check something that the compiler thinks is non-null and it will emit the conditional. When Java libraries are incorrectly annotated this is a lifesaver.Edoardo Luppi
01/25/2024, 6:44 PMEdoardo Luppi
01/25/2024, 6:48 PM