There is kotlin compiler option:
-Xno-check-impl Do not check presence of ‘impl’ modifier in multi-platform projects
o
orangy
09/06/2017, 12:29 PM
It is unrelated to the question
g
gildor
09/06/2017, 2:41 PM
Oh, copied a wrong line 😣
@myanmarking sorry, wrong copy/paste.
You need these flags:
-Xno-call-assertions Don't generate not-null assertion after each invocation of method returning not-null
-Xno-param-assertions Don't generate not-null assertions on parameters of methods accessible from Java
k
kingsley
09/06/2017, 3:56 PM
I don’t think these flags do anything currently though. I remember reading that somewhere, and also tried a while ago
n
ngubenson
09/07/2017, 1:54 AM
-Xno-param-assertions What are the benefits of doing so? The program still will get NPE when pass null to no-null kotlin methord.
g
gildor
09/07/2017, 2:06 AM
Of course
n
ngubenson
09/07/2017, 2:51 AM
I think the benefit is that we can check null value by ourself to get rid of NPE.