agomez
08/15/2017, 8:08 PMby lazy
skennedy
08/15/2017, 8:09 PMkarelpeeters
08/15/2017, 8:12 PMgabrielfv
08/15/2017, 8:32 PMnkiesel
08/15/2017, 8:42 PMlateinit val
. I also suspect that nearly all lateinit var
are (and should be) only assigned once anyway. So would be cool if the compiler could enforce that.agomez
08/15/2017, 8:45 PMval myValue: Type by lazy { /* initialization code */ }
agomez
08/15/2017, 8:45 PMpoohbar
08/15/2017, 8:57 PMlateinit
not only allowed on `val`s? It would make more sense for the reasons described by Norbertkarelpeeters
08/15/2017, 8:58 PMlateinit
are cases where the compiler couldn't deduce that it would even be initialized at all, so how would it know it's only initialized once?v79
08/15/2017, 9:12 PMlateinit val
! But I've been persuaded it's not possible.dumptruckman
08/15/2017, 9:12 PMnkiesel
08/15/2017, 9:57 PMvar
vs. val
.nkiesel
08/15/2017, 9:58 PMby lazy
does not work for DI because it requires the initialization code / value in the classagomez
08/15/2017, 10:05 PMby lazy
Posted in #generaluser
08/16/2017, 2:15 AMhttps://kotlinlang.slack.com/files/U5Z66QKBK/F6P2H5QRJ/screen_shot_2017-08-15_at_13.08.36.png▾
user
08/16/2017, 2:16 AMhttps://kotlinlang.slack.com/files/U5Z66QKBK/F6P2H5QRJ/screen_shot_2017-08-15_at_13.08.36.png▾
user
08/16/2017, 2:16 AMhttps://kotlinlang.slack.com/files/U5Z66QKBK/F6P2H5QRJ/screen_shot_2017-08-15_at_13.08.36.png▾
michaelzinn
08/16/2017, 10:56 AMjava.lang.IllegalArgumentException: Parameter type must not include a type variable or wildcard: java.util.List<? extends java.util.List<java.lang.String>>
. Why does it turn into ? extends ...
and what’s the best solution here?karelpeeters
08/16/2017, 11:00 AMinterface List<out E>
and that is compiled to a wildcard. I think you can use MutableList
, since that doesn't have a wildcard.karelpeeters
08/16/2017, 11:01 AMtieskedh
08/16/2017, 12:42 PMkarelpeeters
08/16/2017, 1:36 PMjre7
one, I don't know what happens if you exclude it.mikehearn
08/16/2017, 3:55 PMtrevjones
08/16/2017, 4:14 PMgildor
08/16/2017, 4:24 PMmikehearn
08/16/2017, 4:29 PMkarelpeeters
08/16/2017, 8:12 PMlist.find{it > 5} != null
would be list.containsMatch{it > 5}
.vmironov
08/16/2017, 8:14 PMlist.any { it > 5 }
lab
08/16/2017, 8:45 PMlab
08/16/2017, 8:46 PM