skennedy
01/15/2019, 9:49 PMjw
01/15/2019, 9:58 PMIntrinsics
class is written in Java presumably to avoid inadvertent recursionthana
01/15/2019, 10:05 PMRuckus
01/15/2019, 10:09 PMthana
01/15/2019, 10:16 PMNikky
01/16/2019, 2:13 AMfun <T> save(config: T = T())
is there a way to specify that T needs to have a noarg constructor ?Shawn
01/16/2019, 2:14 AM() -> T
and pass in ::Foo
Shawn
01/16/2019, 2:15 AMKlaus
07/17/2020, 10:23 AMKlaus
07/17/2020, 10:23 AMKlaus
07/17/2020, 10:23 AMKlaus
07/17/2020, 10:23 AMKlaus
07/17/2020, 10:24 AMKlaus
07/17/2020, 10:24 AMuser
07/17/2020, 1:16 PMkenkyee
07/17/2020, 2:55 PMkenkyee
07/17/2020, 2:55 PMv79
07/18/2020, 9:09 AMktor
or osiris
- because routes defined like get("post-list") { req -> ... }
aren't functions. Worse, `Spek`puts everything into the constructor, so test classes are entirely without a body. Doesn't anyone else see this as a bit of problem?Karlo Lozovina
07/18/2020, 10:22 PMcompanion object
implement abstract val
members from parent classes? I'd like my property to be created only once, and shared among all instances... but that doesn't seem to work?
if not, can somehow parent class require that inherited classes implement a companion object?addamsson
07/20/2020, 11:41 AM<reified R : Resource, reified I : Any, reified O : Any, T : OperationDescriptor<R, I, O>>
addamsson
07/20/2020, 11:41 AMR
, I
and O
out because I can't have nested generics in Kotlinaddamsson
07/20/2020, 11:41 AMIterable<T>
as wellseizma
07/20/2020, 2:00 PMVitor Prado
07/20/2020, 2:19 PMEugene Freeman
07/20/2020, 4:42 PMuser
07/20/2020, 5:02 PMuser
07/21/2020, 9:35 AMBen Madore
07/21/2020, 3:21 PMobject
hierarchy
e.g. i have:
object foo {
object bar {
val barval = "123"
val barval2 = "234"
}
object baz {
val bazval = "abc"
val bazval2 = "bcd
}
}
how can i programmatically get 123, 234, abc, bcd.
foo::class.nestedClasses.forEach{klazz ->
klazz.memberProperties.forEach{ it: KProperty1<out Any,*>
println(it)
}
}
gets me all the properties e.g.
val foo.bar.barval: kotlin.String
val foo.bar.barval2: kotlin.String
val foo.baz.bazval2: kotlin.String
val foo.baz.bazval2: kotlin.String
but i’m unclear on how to actually get those values