In GS/64 3.0, the syntax for Array constructors was changed from using square brackets with commas (for example: #[a, b, c] ) to using curly brackets with periods (for example: {a . b . c} ). This was done to avoid conflicts with the use of square brackets for ByteArray constructors (for example: #[1 2 3] ) for compatibility with other Smalltalks.
The System configuration parameter #GemConvertArrayBuilder was introduced to inform the compiler to treat #[ ... ] as a pre-3.0 Array constructor and to compile it accordingly. But note that this will cause problems if processing post-3.0 code containg #[...] ByteArray constructors.
For example, if compiling code using the pre-3.0 Array constructor #[a , b, c], and #GemConvertArrayBuilder is incorrectly set to nil/false, a compiler error similar to the following will be generated:
GemStone Smalltalk Compiler Errors: #[a, b, c] * ^1 ^2 ******* 1: [1035] expected a right bracket (]) 2: [1034] unexpected token
Inversely, if compiling post-3.0 code containing the ByteArray constructor #[1 2 3] and #GemConvertArrayBuilder is incorrectly set to true, a compiler error similar to the following will be generated:
GemStone Smalltalk Compiler Errors: #[1 2 3] * ^1 ******* 1: [1034] unexpected token
When compiling code (for example, during upgrades or file-ins) be aware of which type of constructor is used in the source code and make sure that #GemConvertArrayBuilder is set accordingly. In general this means that for pre-3.0 code #GemConvertArrayBuilder should be set to true, and for post-3.0 code the parameter can be left unset or set to false/nil. If not correctly set, compiler errors will be generated on any #[ ] constructors.
Make sure #GemConvertArrayBuilder is set properly (true for pre-3.0 code, unset/nil/false for post-3.0 code).
Last updated: 12/11/15