rook
10/16/2017, 8:55 PMsuper
constructor based on the parameters supplied?strelok
10/17/2017, 1:55 AMIterable<T>.all(...)
returns true
if the collection is empty?dhf
10/17/2017, 10:13 AMleonardootto
10/17/2017, 9:19 PMalex.krupa
10/18/2017, 7:15 AMnil2l
10/18/2017, 7:38 AMlistOf(1) + listOf(2,3,4,5)
. Something like this 1 :: listOf(2,3,4,5)
.edwardwongtl
10/18/2017, 8:48 AMt
is Iterable
inside your concat
, and skip the listOf(t)
is truermarinsky
10/18/2017, 9:04 AMhttps://i.imgur.com/MMLBe47.png▾
Paul Woitaschek
10/18/2017, 6:36 PMMarc Knaup
10/18/2017, 7:30 PMinline fun <reified Value : Any> test1(): Value = TODO()
inline fun <reified Value : Any> test2(): List<Value> = TODO()
val test: List<Int> = test1()
In the example using test1()
(accidentally instead of test2()
) should raise an error because I cannot get the generic type of the List
anyway.joelpedraza
10/18/2017, 8:45 PMbar(::foo)
is an unresolved reference however, receievr type mismatchPaul Woitaschek
10/18/2017, 8:56 PMtianhao
10/19/2017, 3:24 AMKotlin: Unchecked cast: Array<out Validator> to Array<Validator>
tianhao
10/19/2017, 5:34 AMreturn list.stream().allMatch(new HashSet<>()::add);
540grunkspin
10/19/2017, 8:49 AMOlekss
10/19/2017, 9:06 AMOlekss
10/19/2017, 10:01 AMjlleitschuh
10/19/2017, 9:22 PMdomfox
10/20/2017, 1:37 PMinline fun <reified T, R> Class<T>.reifyIn(f: () -> R): R = f()
but it didn't appear to helppavel
10/20/2017, 5:41 PMnkiesel
10/20/2017, 9:32 PMval x by y.z
syntax?
A concrete example is the following
interface A {
val a: String
}
class AImpl : A {
override val a = "hello"
}
interface B {
var b: Int
}
class BImpl : B {
override var b = 42
}
class C : A, B {
private val _a = AImpl()
private val _b = BImpl()
// override val a by _a.a
override val a
get() = _a.a
// override val b by _b.b
override var b
get() = _b.b
set(v) { _b.b = v }
}
fun main(args: Array<String>) {
val c = C()
c.b = 11
println("a=${c.a} b=${c.b}")
}
rrva
10/23/2017, 2:48 PMmyanmarking
10/23/2017, 3:23 PMkarelpeeters
10/23/2017, 10:33 PMjava.lang.Enum
, can you post your code and error message?karelpeeters
10/24/2017, 10:39 AMmyanmarking
10/24/2017, 11:12 AMGeir
10/24/2017, 7:24 PMClass<? extends Enum>
, which I cannot figure out how to get from my Kotlin enum.
I've tried MyEnum
, MyEnum.javaClass
and MyEnum::class
all with/without companion object on MyEnum, all with different compile errors.
How do I get MyEnum's java.lang.Class<? extends java.lang.Enum>
?cody
10/24/2017, 7:41 PM@property
when writing KDoc? Using the Kotlin plugin for Android Studio it appears to break the generation of documentation for the tooltip window. Essentially everything after @property
does not display.
Sorry if this has already been discussed, I looked through the channel but didn’t see it popupDanielVF
10/24/2017, 8:45 PMgroostav
10/24/2017, 8:55 PMcos( .75 + pi)
== 0.9976...
groostav
10/24/2017, 8:55 PMcos( .75 + pi)
== 0.9976...
mzgreen
10/25/2017, 6:08 AM