groostav
07/06/2016, 9:04 PMinline
represents an AST transform applied in the front-end of the kotlin compiler, then I would expect the code
inline fun someMethod(arg: ImportantDomainThing) : Boolean {
return arg.alpha > THRESHOLD || arg.x > 42.0
}
DBFacade.filter(lambda: CodeTree){
this.where(generateWhereQuery(lambda))
}
then the query
dbFacade.filter { someMethod(it.importantDomainThing) }
would be re-written by a near-front-end component to be:
dbFacade.filter { it.importantDomainThing.run { it.alpha > THRESHOLD || it.x > 42.0 } }