elect
06/21/2019, 10:34 AM\t
, is this wanted or a bug?U75957
06/21/2019, 10:56 AMthis::class
is available, but super::class
- not.
Need this.Бежан Александр
06/21/2019, 11:37 AMcollectFirst
for that. How to do it in Kotlin ?yawkat
06/21/2019, 2:25 PMegorand
06/21/2019, 2:28 PMpublic static final Long DEFAULT_DEFAULT_SINT64 = -9223372036854775808L;
and a similar piece of Kotlin code that fails with “value out of range”:
const val DEFAULT_DEFAULT_SINT64: Long = -9223372036854775808L
to make matters worse, I’m producing this value using BigInteger(value).toLong()
, which is supposed to narrow an out of range value, but apparently it doesn’t work with Kotlinadams2
06/21/2019, 5:59 PM@VisibleForTesting
for this situationHullaballoonatic
06/21/2019, 7:55 PMUnit
? I'm not a huge fan of Void
, but I'd just as soon prefer Blah
Benoît
06/22/2019, 2:23 AMinfix fun <T> Any.go(block: (T) -> Unit) {
}
fun main() {
// Valid
"".go<String> {
}
// Invalid
"" go <String> {
}
}
Ifvwm
06/22/2019, 3:32 AMAllan Wang
06/22/2019, 6:47 AM"\033[0m"
in java.
However, it doesn’t seem to be a valid string in kotlin. Using the library also doesn’t seem to work for me, whereas if I replace \033
with \u001B
, everything works fine.
Is there a reason for this, or a reason why the library doesn’t work when it is used?Ifvwm
06/22/2019, 12:22 PMyawkat
06/22/2019, 12:41 PMkartikpatodi
06/23/2019, 4:42 PMsannysoft
06/23/2019, 6:14 PMERROR: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/scripting/repl/GenericReplCompiler
when I try to use it with Kotlin version > 1.3.21. Any suggestions?serebit
06/24/2019, 1:40 AMtypeOf
?diesieben07
06/24/2019, 10:13 AMtypeOf
intrinsic does not retain type annotations. Is this intended or a bug?Joan Colmenero
06/24/2019, 3:51 PMAlex Spence
06/24/2019, 5:13 PMHullaballoonatic
06/24/2019, 7:35 PMinterface Foo<F: Foo<F>>
I'm always confused by when I can define a type as
interface Foo<F: Foo<F>> {
val incorrect: F // why can I almost never define it like this?
val correct: Foo<F> // why does the type require Foo<F>, when F is already Foo<F>?
}
Alex Spence
06/24/2019, 7:52 PMegorand
06/24/2019, 8:22 PMe: /.../Io.kt: (4, 26): Cannot access built-in declaration 'kotlin.annotation.AnnotationRetention'. Ensure that you have a dependency on the Kotlin standard library
it does make complete sense for those modules to have a dependency on stdlib, but I’m wondering how it worked beforeKevin
06/24/2019, 10:05 PMextensions.kt
with a top-level function @file:JvmName("Utils")
and fun String.secretFeature()
, in the Java code, this translates to Utils.secretFeature(myString)
. However, the parameter name for myString
becomes $this$secretFeature
and generates a constant available at runtime used in the generated Intrinsics.checkParameterIsNotNull()
invocation. We rely on ProGuard for stripping out unreleased features and have a script to decompile and search for keywords. In this case, this generated parameter name is leaked as there's no way for ProGuard to remove that constant. I'd like to do something like @receiver:JvmName("stringParam") fun String.secretFeature()
.simon.vergauwen
06/24/2019, 11:05 PMfun example(f: (String) -> Unit): Unit
into fun example(f: (stringParam: String) -> Unit): Unit
and refactor all usages of the lambda to use that name in my project?Antanas A.
06/25/2019, 8:29 AMStarting from 1.3.40, the compilations.outputKinds is no longer supported, please use the binaries API instead.
Can anyone help me to convert this line of gradle into "binaries API"?
fromPreset(project.hasProperty('iosDevice') ? presets.iosArm64 : presets.iosX64, 'ios') {
compilations.main.outputKinds 'framework'
}
user
06/25/2019, 9:30 AMhttps://pbs.twimg.com/media/D8sdPOCXoAAp9WD.png▾
Nicole
06/25/2019, 12:21 PMLeszek Janiszewski
06/25/2019, 12:31 PM\d{3}\.\d{10},
?
Negative lookup (?!\d{3}\.\d{10},)
doesn’t seem to work here for some reason.
The example message looks like this 2019-06-25 13:45:22.286 13313-13351/com.secretproject.alpha I/Http Response: │ 247.2145208724,
Filtering out based on TAG is not a feasible solution, because I need this to log out other responses.poohbar
06/25/2019, 1:49 PMrun
run {
// some code
}
{ /*my unrelated block here*/ } shouldNotThrow AnyException
jdemeulenaere
06/25/2019, 4:58 PMLeoColman
06/25/2019, 7:37 PM