Contact | License

# 1060 - Can't modify frozen variable '%s'.

Description
An attempt was made to assign a value to a frozen variable. Variables are frozen when they are being iterated with ForEach.
Example
Config:
.Array = { 'a', 'b', 'c' } ForEach( .Item in .Array ) { ^Array + 'loop variables are frozen' }
Output:
C:\Test\fbuild.bff(4,5): FASTBuild Error #1060 - Can't modify frozen variable '.Array' ^Array + 'loop variables are frozen' ^ \--here
Fix:
.Array = { 'a', 'b', 'c' } .Array2 = .Array ForEach( .Item in .Array ) { ^Array2 + 'add to other array' }