bjonnh
04/05/2019, 10:26 PMGarouDan
04/06/2019, 3:42 AM2018.3.6
to 2019.1
without reinstalling? Can Check Updates
do this for me somehow?Javier
04/06/2019, 12:07 PMbombe
04/06/2019, 12:09 PMval
.turansky
04/06/2019, 12:14 PMSets.difference
?
In Kotlin it will be:
fun Set<T>.difference(other: Set<T>): Set<T>
{
return subtrack(other) + other.subtrack(this)
}
ec
04/07/2019, 10:02 AMscottiedog45
04/07/2019, 4:45 PMRobert
04/07/2019, 9:19 PMSmallville7123
04/08/2019, 11:19 AMfun a(b : Int) {
var c = b
c = 5
}
amadeu01
04/08/2019, 12:04 PMamadeu01
04/08/2019, 1:00 PMkartikpatodi
04/08/2019, 3:02 PMDias
04/08/2019, 4:00 PMAny?.toString()
returns "null" rather than actual null?karelpeeters
04/08/2019, 4:02 PMx?.toString()
can return null
, x.toString where x:Any?
will return "null"
instead.xenoterracide
04/08/2019, 6:28 PMSmallville7123
04/08/2019, 11:53 PMkotlin.collections.EmptyList cannot be cast to Kpp_gradle$1$1$1$a
fun <E> addOne(v: AbstractList<E>) {
v.add(listOf<E>() as E)
}
class a {
val empty : Int = 0
}
fun ret() {
val f = arrayListOf<a>()
f.add(a())
println("type of f is ${f.javaClass}")
println("type of f[0] is ${f[0].javaClass}")
addOne(f)
println("type of f is ${f.javaClass}")
println("type of f[1] is ${f[1].javaClass}")
abort()
}
nwh
04/09/2019, 1:12 AM1.3.0
(rebuilt), then coroutines to 1.0.0
, and received no offer for automatic conversion
EDIT: Found an alt-enter option to fix it, nevermindMike
04/09/2019, 2:16 AMconst
will get inlined by the compiler in your Kotlin code, but will also be static so they can be accessed from Java.tipsy
04/09/2019, 6:37 AMfun myFutureFunction(): ComleteableFuture<String> {
// convert here?
return ... myCoroutineFunction();
}
fun myCoroutineFunction() {
// ... do most things here
}
gregorbg
04/09/2019, 6:56 AMinterface FancyConnector<T : Transcoder<I, O>> : RawHttpConnector {
val transcoder: T
fun send(entity: I) = sendRaw(this.transcoder.encode(entity))
fun receive(): O = this.transcoder.decode(receiveRaw())
}
interface Transcoder<I, O> {
fun encode(entity: I): HttpBytes
fun decode(raw: HttpBytes): O
}
How can I make the compiler recognise the I
and O
type generics? Or alternatively, how can I define my interfaces so that FancyConnector
doesn't need to know the internal types of Transcoder
?
EDIT: Imagine there is a class IdentityTranscoder<E> : Transcoder<E, E>
. I want to be able to use it like class MyConnector<IdentityTranscoder<Foo>>
instead of having to specify class MyConnector<Foo, Foo, IdentityTranscoder<Foo>>
ghedeon
04/09/2019, 8:11 AMSmallville7123
04/09/2019, 8:43 AM[18:05:11] <macropreprocess> Reason: Type 'java/lang/Object' (current frame, stack[1]) is not assignable to 'java/lang/Integer' Current Frame: bci: @111 flags: { } locals: { 'java/util/ArrayList', 'java/lang/String' } stack: { 'java/lang/StringBuilder', 'java/lang/Object', null }
[18:08:13] <Bombe> Please go back to coding C.
[18:08:13] <Bombe> Java is obviously not for you.
[18:08:13] <yawkat> macropreprocess: tf are you doing to get that error?
[18:08:13] <yawkat> can you paste youre code?
[18:08:13] <yawkat> your*
[18:08:38] <Bombe> That’s not code.
[18:36:58] <macropreprocess> yawkat: <https://bpaste.net/show/bf6b86553f0a>
[18:37:13] <macropreprocess> wait no
[18:38:27] <macropreprocess> <https://bpaste.net/show/91122a1a2a5e>
[18:38:31] <macropreprocess> yawkat:
[18:39:49] <yawkat> yea that looks like a bug
[18:41:29] <macropreprocess> oh
[18:41:37] <macropreprocess> yay i found a bug
Giorgio Antonioli
04/09/2019, 1:44 PMtrue
. Is there a shorter way (in the stdlib maybe) to write the following?
someBooleanCondition.takeIf { true }?.let { "dummy-string" }
E.g. (in pseudo-code)
someBooleanCondition.ifTrue { "dummy-string" }
Jukka Siivonen
04/09/2019, 4:49 PMdmcg
04/09/2019, 6:14 PMthis
nor $receiver
seem to be it.robstoll
04/09/2019, 6:30 PMsnowe
04/09/2019, 7:46 PMRobert
04/09/2019, 8:51 PMbuild.gradle.kts
Jukka Siivonen
04/10/2019, 8:27 AMBernhard
04/10/2019, 9:39 AMBernhard
04/10/2019, 9:39 AMdiesieben07
04/10/2019, 9:41 AMstring.isNullOrBlank()
Bernhard
04/10/2019, 9:41 AMdiesieben07
04/10/2019, 9:44 AMBurkhard
04/10/2019, 9:44 AMfun String?.isNullOrBlank() = ...