mg6maciej
04/03/2017, 11:06 AMfileToFoo
is defined on File
?mg6maciej
04/03/2017, 11:06 AMFile::fileToFoo
should work.mg6maciej
04/03/2017, 11:07 AMFile
, ::fileToFoo
should work.sreich
04/03/2017, 11:07 AMmg6maciej
04/03/2017, 11:07 AMobjectOfThatClass::fileToFoo
should work.mg6maciej
04/03/2017, 11:08 AMandrei.heidelbacher
04/03/2017, 12:40 PMandrei.heidelbacher
04/03/2017, 12:42 PMdh44t
04/03/2017, 12:44 PMandrei.heidelbacher
04/03/2017, 12:44 PMborboss
04/03/2017, 1:50 PMborboss
04/03/2017, 1:50 PMalexey.tsvetkov
04/03/2017, 2:10 PMbeholder
04/03/2017, 5:41 PM@DslMarker
works? Readed docs several times and still cannot grok it.cy
04/03/2017, 6:01 PMcy
04/03/2017, 6:03 PMinterface Tag
for all tags is marked with this annotationIan
04/03/2017, 8:34 PMinline fun <reified T : Any, E : Element> ElementCreator<E>.render(d : ElementCreator<E>.(T) -> Unit) {
When I call it I need to supply both type parameters, ie:
render<Entity.List, BodyElement> { it -> … }
Note that this
will be an ElementCreator<Something>
.
My question is: why can’t the second type parameter E
be inferred from the type of this
, why do I need to supply it when I call render
?orangy
Ian
04/03/2017, 8:39 PMorangy
creator.render<String>().using { }
Ian
04/03/2017, 8:44 PMpakoito
04/03/2017, 8:48 PMpakoito
04/03/2017, 8:49 PMpakoito
04/03/2017, 8:49 PMIan
04/03/2017, 8:50 PMrender.with<Entity.List> { it ->
dariuszbacinski
04/03/2017, 9:17 PMobject
and reference it at program start?dariuszbacinski
04/03/2017, 9:18 PMpakoito
04/03/2017, 9:20 PMand reference it at program startthis is the tricky bit, I want to use it on a library
dariuszbacinski
04/03/2017, 9:20 PM