just started to do a bit Xtend again and fell into the first pit right after the second step. How do declare a “function” with a pre-declared return type?
val org.eclipse.xtext.xbase.lib.Functions$Function1 calculateTimeOut = [
//just an example
I want to call it like that to retrieve an value (at best as primitve int value
val int timeoutValue = calculateTimeOut.apply(illumination_sensor_aussendachmastlicht.state)
What I get is an cannot convert Object to int …
Can anyone help me here ?
How to make such an expression type safe ?