kirillrakhman
12/22/2015, 11:42 AMclass Foo(val a: Bar) {
<T> constructor(provider: BarProvider<T>, key: T) : this(provider.provide(key))
}
voddan
12/22/2015, 11:42 AMkirillrakhman
12/22/2015, 11:43 AMvoddan
12/22/2015, 11:44 AMFoo()
voddan
12/22/2015, 11:45 AMvoddan
12/22/2015, 11:45 AMvoddan
12/22/2015, 11:46 AMcy
12/22/2015, 11:48 AMkirillrakhman
12/22/2015, 11:51 AMcy
12/22/2015, 11:52 AMkirillrakhman
12/22/2015, 11:52 AMsalomonbrys
12/22/2015, 11:59 AMfun <T : Any> Test(klass: KClass<T>, value: T) = Test(klass, value)
class Test internal constructor(val klass: KClass<*>, val value: Any) {
}
That's because both the function and the constructor have the same signature.salomonbrys
12/22/2015, 12:00 PMsalomonbrys
12/22/2015, 12:01 PMkirillrakhman
12/22/2015, 12:03 PMcedric
12/22/2015, 6:51 PMK2VMCompiler
or do I need a flag?udalov
cedric
12/22/2015, 6:55 PMmobigeek
12/22/2015, 7:09 PMyoavst
12/22/2015, 7:17 PMKPropertyN now extend FunctionN, i.e. list.map(String::length) works now
Didn't it work before?damian
12/22/2015, 7:19 PMProperties can be used as parameterless function objects❤️
yoavst
12/22/2015, 7:20 PMArray(10) { it }.map(Int::toString)
this works also in Beta 3evanchooly
12/22/2015, 7:45 PMevanchooly
12/22/2015, 7:45 PMuser
12/22/2015, 8:02 PMhttps://pbs.twimg.com/media/CW2vAZLW4AABhE9.png▾
mplatvoet
12/22/2015, 8:03 PM3.0.0-beta.4
, so there.treelzebub
12/22/2015, 8:09 PMribesg
12/22/2015, 8:12 PMIntArray(5) { it * 3 }
ribesg
12/22/2015, 8:12 PMvmironov
12/22/2015, 8:12 PMintArrayOf(0, 3, 6, 9, 12)