sean
07/31/2020, 11:22 PMdmitriy.novozhilov
08/01/2020, 7:49 AMdmitriy.novozhilov
08/01/2020, 7:50 AMdmitriy.novozhilov
08/01/2020, 7:51 AMRoman Artemev [JB]
08/01/2020, 10:15 AMsean
08/03/2020, 6:41 PMdmitriy.novozhilov
08/03/2020, 6:48 PMsean
08/03/2020, 6:52 PMsean
08/03/2020, 7:06 PMdmitriy.novozhilov
08/04/2020, 8:03 PM-Xuse-fir
compiler flagsean
10/02/2020, 4:45 PMUnit
in that case?sean
10/02/2020, 5:12 PMdmitriy.novozhilov
10/05/2020, 7:46 AMdoes this include functions which don't return anything?No, because
fun foo() {}
and fun foo(): Unit {}
are equal declarations for compiler, missing : Unit
here is just syntax sugar
Also, is this relevant to lambdas? I.e. should anonymous functions with explicit return types specified be preferred from a compiler performance perspective?Each implicit type (missing return type, not declared type of property, not specified type type arguments of call, etc) increase amount of work for compiler, because those types should be inferred. If you are generating code then you can try explicitly declare as much types as possible