ubu
01/26/2020, 2:05 PMChills
01/26/2020, 3:01 PMChills
01/26/2020, 3:05 PMBruno_
01/26/2020, 3:23 PMdata class Progress(val progress: Int, val max: Int)
it's a function param in one of the services and only two more services will ever have to use itchansek
01/26/2020, 3:29 PMChills
01/26/2020, 4:01 PMChills
01/26/2020, 4:44 PMRay Eldath
01/26/2020, 7:01 PMlateinit
, only can be a var
instead of val
. and perhaps companion object
, it's a good idea, but i think the syntax is not very good.(though i think i can't come up with a better design 😶)paulex
01/27/2020, 12:46 AMfun foo(callback){
GlobalScope.launch {
val x = async {//}.await()
callback(x)
}
}
//Test
@Test
`test that we can test`(){
//i should be able to test that callback is called with value x
}
thanksforallthefish
01/27/2020, 8:46 AMclass Test{}
class Another {
fun <E: Any> test2(test: E) = test.test()
fun <E: Any> E.test() =
println(javaClass.simpleName)
}
Another().test2(
Test()
)
prints Test
class Test{}
class Another {
fun <E: Any> test2(test: E) = test.test()
fun <E: Any> E.test() =
println(this.javaClass.simpleName)
}
Another().test2(
Test()
)
prints Test
elect
01/27/2020, 10:33 AMCharArray
from an IntArray
other than .let{ ints -> CharArray(ints.size){ints[it].toChar()}
?steenooo
01/27/2020, 12:57 PMiex
01/27/2020, 1:21 PMfun foo(): Observable<Result<String, String>> =
Observable.just(Success(""))
.onErrorResumeNext { t: Throwable -> Failure("") } // Type mismatch: inferred type is Observable<Result.Success<String>!>! but Observable<Result<String, String>> was expected
// where:
sealed class Result<out T, out E> {
data class Success<out T>(val success: T) : Result<T, Nothing>()
data class Failure<out E>(val error: E) : Result<Nothing, E>()
}
Matsushita Kohei
01/27/2020, 2:45 PMBig Chungus
01/27/2020, 3:21 PMinternal
via gradle or compiler arg?nfrankel
01/27/2020, 4:40 PMChills
01/27/2020, 10:34 PMjimn
01/28/2020, 7:57 AMObaid Jatoi
01/28/2020, 10:14 AMRodrigo Silva
01/28/2020, 1:45 PMGeorgi Naumov
01/28/2020, 2:38 PMKroppeb
01/28/2020, 6:58 PMTommi Reiman
01/28/2020, 8:50 PMSlackbot
01/29/2020, 12:19 AMvictor-mntl
01/29/2020, 7:12 AMWARN: Failed to initialize native filesystem for Windows
java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
at <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.openapi.application.PathManager.getHomePath(PathManager.java:97) (...)
Looks like a common issue in other projects that is solved using System.setProperty("<http://idea.io|idea.io>.use.fallback", "true")
or System.setProperty("idea.use.native.fs.for.win", "false")
called before KotlinCoreEnvironment.createForProduction
e.g.: https://github.com/arturbosch/detekt/issues/630
Is it something wrong? Anything missing on my side?Ray Eldath
01/29/2020, 7:26 AMluke
01/29/2020, 9:03 AMsuspend fun
only ever return a java/lang/Object
? Can't seem to make it typed.Big Chungus
01/29/2020, 9:21 AMJiri Bruchanov
01/29/2020, 10:31 AMtschuchort
01/29/2020, 1:35 PM