Reported By: Michael Dreher Reported On: 5/25/2018 For: Version 2.06 Build 14
# 4649Using Characters for Default Values for Arrays of Strings Can Cause Incorrect Compiler Errors I'm observing the following behaviors in the compiler:
var
// This compiles...
array1 : array of string = ['11', '22'];
array2 : array of string = ['11', '2'];
array3 : array of string = ['1', '22'];
// ...but on this I get a compiler error:
array4 : array of string = ['1', '2'];
// [Error] Main.wbs (11,30): Expected array of String but instead found
Comments and WorkaroundsThe issue was with how type detection/promotion was being handled for default array variable values, specifically when mixing characters with arrays of strings, and integers with arrays of doubles.
ResolutionFixed Problem on 5/26/2018 in version 2.06 build 15
Products AffectedElevate Web Builder Elevate Web Builder Trial