WukongRework.exe
12/12/2022, 12:05 AMfoo?.bar?.baz
the code generated is (tmp$ = foo != null ? foo.bar : null) != null ? tmp$.baz : null
. This feels unnecessary as there are multiple null
checks. Couldnt an alternative be foo == null ? null : (foo.bar == null ? null : foo.bar.baz)
? this removes all the extra != null
checks. If there is some reason for this that I am unaware, please let me know. Thanks in advance for the clarificationephemient
12/12/2022, 12:20 AMWukongRework.exe
12/12/2022, 12:33 AM== null
? and early exit with a null value?WukongRework.exe
12/12/2022, 12:34 AMWukongRework.exe
12/12/2022, 12:37 AM(tmp$ = foo) == null ? null : ((tmp$ = tmp$.bar) == null ? null : tmp$.baz)
?Ayfri
12/12/2022, 2:30 AMephemient
12/12/2022, 2:55 AMephemient
12/12/2022, 2:57 AMAyfri
12/12/2022, 3:00 AM