initial() on a const variable does not compile, saying "cannot change constant value".
Numbered Steps to Reproduce Problem:
Use initial() on a const variable
Code Snippet (if applicable) to Reproduce Problem:
/datum/var/const/some_const_var = 1
/world/New()
var/datum/D = /datum
var/thing = initial(D.some_const_var)
world.log << "thing is [thing]"
Expected Results:
"thing is 1"
Actual Results:
error: D.some_const_var: cannot change constant value
Does the problem occur:
Every time? Or how often? Every time
In other games? Yes
In other user accounts? Unknown
On other computers? Unknown
When does the problem NOT occur? When the var is not const.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Unknown
Workarounds: None known
It does not, however, work for parent_type, which is the 'const' var I initially tested before genericising it for this bug report.