Error highlighting in Eclipse Smarthome

Started using eclipse for the rules after some massive double quote “” bug that took me 4h to find
As noted in other threads Eclipse has has some trouble error highlighting.
Can some someone knowleagable with the rule language confirm for me if that is a false positive or I indeed do something wrong with my variable definition.

var Number pv1 = B_Power_PV_String1.state

Is marked as " type mismatch cannot covert state to number"
How should have I done that properly.

The whole rule is below and it works fine.

	rule "Sum PV power"
    when
        Item B_Power_PV_String1 changed or
		Item B_Power_PV_String2 changed
    then
		var Number tmp
		var Number pv1 = B_Power_PV_String1.state
		var Number pv2 = B_Power_PV_String2.state
		tmp = pv1.floatValue + pv2.floatValue
		postUpdate(B_Power_PV_Sum, tmp)
		 
    end