jlleitschuh
08/17/2017, 3:04 PMDouble
so you can do this: 0.5.toBigDecimal()
jw
08/17/2017, 3:26 PMBigDecimal(0.5)
benleggiero
08/17/2017, 11:39 PM+?
to append a new element to the end of an array only if that new element is not null.pixelbumper
08/18/2017, 7:31 AMbenleggiero
08/20/2017, 12:49 AMval x = 0xE
x = and 0x1
dean
08/20/2017, 5:15 AMkarelpeeters
08/23/2017, 10:11 PMNote that anonymous objects can be used as types only in local and private declarations. If you use an anonymous object as a return type of a public function or the type of a public property, the actual type of that function or property will be the declared supertype of the anonymous object, orif you didn't declare any supertype. Members added in the anonymous object will not be accessible.Any
louiscad
08/24/2017, 8:09 AMprivate inline fun <reified E : Exception> throwOrReport(f: () -> Unit) {
try {
f()
} catch (e: E) { //Currently, compiler says: "Reified type is forbidden for catch parameter"
if (BuildConfig.DEBUG) throw e else <http://Timber.wtf|Timber.wtf>(e)
}
}
sanf0rd
08/29/2017, 1:12 AMinterface SomeInterface {
fun hi()
}
class SomeClass: SomeInterface {
}
fun SomeClass.hi() {
print("hi")
}
So, My proposal is that the compiler can infer the interface conformance with the extension function implementation and not show an error in the class declaration. What do you think guys?dmitry.petrov
08/29/2017, 2:40 PMsanf0rd
08/29/2017, 4:15 PMbenleggiero
08/29/2017, 11:34 PMvoddan
09/01/2017, 1:10 PMprintStat
to accept Score
directly. Assuming this did not work for you real use case, what was the problem with it?elect
09/02/2017, 9:08 AMiterator()
on buffers and derivates?guenther
09/06/2017, 9:57 AMCharProgressionIterator
, IntProgressionIterator
, LongProgressionIterator
should be serializable. They just have primitives and are good candidates to add the Serializable
-Interface which will makes ranges serializableeddie
09/07/2017, 8:35 PMchalup
09/08/2017, 7:54 AMrrader
09/08/2017, 2:30 PMclass Product(val title: String, val description: String)
class Electronics(title: String, description: String, val memory: Long) : Product(title, description)
class Clothing(title: String, description: String, val size: Long) : Product(title, description)
it will more nice to do like
class Clothing(embed product: Product, val size: Long)
and not to duplicate everytime title: String, description: String
in child constructorkarelpeeters
09/08/2017, 4:28 PMinline
classes. They'd always be compiled down to a parameter list that basically unwraps their values. Might write up a proposal for it when I find some time.trevjones
09/08/2017, 4:32 PMobject: WhateverInterfaceOrClass()
either way it ends up as a template for the compiler no?rrader
09/11/2017, 8:11 AMsqia09
09/12/2017, 7:19 AMSlackbot
09/13/2017, 8:30 AMjkbbwr
09/13/2017, 10:23 AMgroostav
09/13/2017, 11:02 PMelizarov
09/27/2017, 8:00 PMjw
09/27/2017, 8:23 PMeddie
09/30/2017, 7:35 PMraulraja
10/02/2017, 8:09 PMSlackbot
10/12/2017, 1:50 PM