Function in rule with return value / Result definition warning

Hello together,
to calculate the power of the room heating, I use PWM function. The function is called from heating rule every 10 seconds.
This is working fine. Only one thing is bothering me. OpenHAB prints out this warning message:

Function4 is a raw type. References to generic type Function4<P1, P2, P3, P4, Result> should be parameterized

The function looks like:

val org.eclipse.xtext.xbase.lib.Functions$Function4 calcPMW = [Number SV, Number AV, Number OffSet, Number Faktor|


	var Number Set = .....
	return Set

How can I define the result value to prevent this warning message.
Thanks for help in advance.

As you can see from my example just define the parameters and the return type in advance

val org.eclipse.xtext.xbase.lib.Functions$Function3<GroupItem, GroupItem, OnOffType, Void> updateDynamicSwitchGroup = [
	GroupItem Source,
	GroupItem Destination,
	OnOffType TriggerState

	// Remove all items from destination group
	Destination?.members.forEach[item | Destination.removeMember(item)]

	// Add all items from "Soruce" with state like "TriggerState" to "Destination"
	Source?.members.filter(s | s.state == TriggerState).forEach[item | Destination.addMember(item)]

	logInfo("rule.lambda.updateDynamicSwitchGroup", "Dynamic Group \"{}\" updated with {} members.",, Destination.members.size)
	return null


In your code the return type shoud not be void, it should be Number.


Thanks Thomas,

that was the right hint for me.
Changed my code to:

val org.eclipse.xtext.xbase.lib.Functions$Function4<Number,Number,Number,Number,Number> calcPMW = [Number SV, Number AV, Number OffSet, Number Faktor|

Now, the warning message is gone.