ceylon/ceylon-js — comment on commit 6c40daa2262dfdf698cdf67963eead4b26798dd1
File:  line 0
By ikasiuk:

I don't think the extra `()` is wrong in `function($){return $!==null?$.f:null}(obj)()`: we are talking about something like `obj?.f()`, right? So `obj?.f` becomes `function($){return $!==null?$.f:null}(obj)`, which is a function. And the additional `()` then calls that function. The problem is that there should be a check for `null` so that the function is only called if it actually exists. Note that in the expression `obj?.f()`, the "nullsafe invoke" operator is the `()` (applied to something that may be `null`), not the `?.`.