Seri
08/14/2019, 10:13 PMSlackbot
08/15/2019, 9:57 AMbasher
08/15/2019, 8:27 PMDominaezzz
08/15/2019, 10:12 PMthing
in data class Wrapper(val thing: String?)
(from another module of course).Slackbot
08/16/2019, 8:15 AMDias
08/16/2019, 9:02 AMcoder82
08/16/2019, 1:22 PMSeri
08/16/2019, 4:49 PMjosh
08/16/2019, 4:56 PMJon
08/17/2019, 2:34 AMJon
08/17/2019, 2:35 AMGunslingor
08/18/2019, 5:26 PMcorneil
08/18/2019, 5:53 PMasad.awadia
08/19/2019, 12:52 AMAndrew Gazelka
08/19/2019, 1:50 AMSendChannel<T>
which does not have a suspending send
?karelpeeters
08/19/2019, 6:27 AMBooleanArray(64) { (long shr it) and 1 != 0 }
Sergio Pro
08/19/2019, 6:52 AMprotected var counter: Int
, which is naturally visible in the implementation classes, but not outside. If I try to access protected member from "outside", I get Can not access 'counter': it is protected in ...
compilation error. This is in Kotlin-only code. However from Java I can see all the protected members as well and can access getCounter()
and setCounter()
. Seems like a strange behavior to me and I couldn't fine anything in the docs.coder82
08/19/2019, 11:02 AMdasz
08/19/2019, 12:52 PMinterface A; class AI: A; interface B (val a: A); class BI (override val a: AI): B
conversion from A -> to AI where AI derives from Anaitbit
08/19/2019, 2:56 PM\"
to just quote "
...I cannot find a readable way to write that down as Pair.
I came up with 3 ways to write that down and all of them are borderline unreadable:
"\\\"" to "\""
"""\"""" to """""""
Pair("""
\"
""".trimIndent(),
"""
"
""".trimIndent())
Robert Menke
08/19/2019, 5:41 PMegorand
08/19/2019, 6:51 PM@ObsoleteCoroutinesApi
and @ExperimentalCoroutinesApi
and I don’t want library users to opt into using any of those everywhere in their code, just in the scope of my library. I imagine it has to be something like this:
@Experimental
@UseExperimental(ObsoleteCoroutinesApi::class, ExperimentalCoroutinesApi::class)
annotation class MyExperimental
but the IDE won’t allow me to use @UseExperimental(MyExperimental::class)
in place of e.g. @UseExperimental(ObsoleteCoroutinesApi::class)
in the library code. Is there a proper way to set it up? Does this approach make sense?dumptruckman
08/19/2019, 9:04 PMasad.awadia
08/20/2019, 12:29 AMLastExceed
08/20/2019, 5:49 AMXY is marked unstable
mean?thana
08/20/2019, 7:51 AMevanchooly
08/20/2019, 2:53 PMGuru
08/20/2019, 3:18 PMfun main(args: Array<String>) {
val subt1: SubServiceType.SUBT1 = SubServiceType.SUBT1(SUBT1Type.SUBT11)
val gson = Gson()
val str = gson.toJson(subt1, SubServiceType::class.java)
val strJson = "{\"mainServiceType\":\"SUBT21\"}"
val objSubt2Type = gson.fromJson(strJson, ??) //<- PROBLEM IS HERE
}
enum class MainServiceType(value: Int) {
MAIN(1),
MAIN1(2)
}
interface I1{
val value:Int
}
enum class SUBT1Type(override val value: Int) : I1{
SUBT11(2),
SUBT12(3)
}
enum class SUBT2Type(override val value: Int) : I1 {
SUBT21(2),
SUBT22(3)
}
sealed class SubServiceType(val mainServiceType: I1) {
data class SUBT1(val subServiceType: SUBT1Type) : SubServiceType(subServiceType)
data class SUBT2(val subServiceType: SUBT2Type) : SubServiceType(subServiceType)
}
I am having a problem in serializing this JSON string for sealed class. Any help please?jaguililla
08/20/2019, 5:20 PMLeoColman
08/20/2019, 10:07 PMnullable?.let { list + it } ?: list
LeoColman
08/20/2019, 10:07 PMnullable?.let { list + it } ?: list
Shawn
08/20/2019, 10:18 PMnullable?.let(list::add)
if (nullable != null)
Daniel
08/20/2019, 10:29 PMLeoColman
08/20/2019, 11:02 PMDavid Glasser
08/21/2019, 4:59 AMlist + (nullable ?: listOf())
Ruckus
08/21/2019, 1:35 PMnullable
is a list.