Recently I experienced problem with compiling some oscript code.
When I use code below eclipse says
Old compiler error: You cannot assign an expression of type 'Date' to an lvalue of type 'Integer'.
Date d1 = Date.Now()
Assoc lastCheckTime
lastCheckTime.LastDate = Date.Now()
Integer interval = lastCheckTime.LastDate - d1
To fix an error I can change my code to
Assoc lastCheckTime
lastCheckTime.FirstDate = Date.Now()
lastCheckTime.LastDate = Date.Now()
Integer interval = lastCheckTime.LastDate - lastCheckTime.FirstDate
Or I can change interval type from Integer to Dynamic
I use cside plugin version 10.5.5.327
Can someone check if this bug is fixed or not fixed with new versions of cside?
p.s. I am not sure, but It looks like compiler treats values inside Assoc as Dynamic. Subtracting Date from Dynamic produces the same error. But subtracting Dynamic from Dynamic can be successfully placed into Integer variable.