alexfacciorusso
09/29/2015, 8:38 PM0..12
IntRange and I want to create an IntArray initialized with values from 0 to 12. Can I do it without for loops?cedric
09/29/2015, 8:48 PMalexfacciorusso
09/29/2015, 8:50 PMcedric
09/29/2015, 8:52 PMcedric
09/29/2015, 8:52 PMalexfacciorusso
09/29/2015, 9:02 PM(0..12).toArrayList().toIntArray()
less optimized than a create a 0-inited array, and initialize with a for i in 0..12
?damian
09/29/2015, 9:32 PMalexfacciorusso
09/29/2015, 9:43 PMIntArray(size()) let {
the same of IntArray(size()).let {
?apatrida
09/29/2015, 9:46 PMapatrida
09/29/2015, 9:46 PMapatrida
09/29/2015, 9:48 PMalexfacciorusso
09/29/2015, 9:49 PMmboudraa
09/30/2015, 12:59 PMapatrida
09/30/2015, 2:49 PMapatrida
09/30/2015, 2:50 PMdamian
09/30/2015, 2:51 PMshow kotlin bytecode
is working for me in android studio (currently running canary)damian
09/30/2015, 2:52 PMTools -> Kotlin -> Show Kotlin Bytecode
(you must currently be editing a kotlin file)mboudraa
09/30/2015, 3:47 PMdesseim
09/30/2015, 4:45 PMmboudraa
09/30/2015, 5:34 PMdesseim
09/30/2015, 5:35 PMalexander.asanov
10/07/2015, 12:15 PMpublic fun TODO(): Nothing = throw NotImplementedError()
public fun TODO(reason: String): Nothing = throw NotImplementedError("An operation is not implemented: $reason")
How about making only one version? Something like:
public fun TODO(reason: String? = null) = throw when (reason) {
null -> NotImplementedError()
else -> NotImplementedError("An operation is not implemented: $reason")
}
Single version will make Find Usages
simplier.mboudraa
10/07/2015, 1:24 PMlateinit
, I wonder when using Delegates.notNull()
or lateinit
Any Idea ?ilya.gorbunov
10/07/2015, 1:40 PMFind usages
could find usages of all overloads of TODO. Though it doesn't due to a bug, but eventually it should simple smilealexander.asanov
10/07/2015, 1:41 PMFind usages
eventually find all overloads of all methods always? Or there will be an option?ilya.gorbunov
10/07/2015, 2:30 PMFind Usages Advanced
(Ctrl+Shift+Alt+F7), but once you have checked it, it affects subsequent Find Usages
as well.yasyd
10/08/2015, 6:07 AMantonioleiva
10/08/2015, 6:57 AMmario
03/31/2023, 2:52 PMholgerbrandl
04/01/2023, 5:52 PM@JvmInline
value class Area(val name: String)
"Area(name=foo)" instead of "foo". Aren't they meant to provide just some typesafe wrapper while inline the value whenever possible?