This is a small bug fix release.
The following minor issues have been fixed:
- Dictionary expression of empty arrays now has the correct type inferred
- Labels for foreach statements
- Type inference for System.Array.reduce
- Function inlining for System.String methods: padRight(int), padLeft(int), startsWith, endsWith
Issue #1:
Dictionary<unsigned int[]> x = {
"foo": (unsigned int[]) [],
"bar": (unsigned int[]) []
};
The casts were previously required in 0.8.4, but, in the latest release, casting of empty arrays is no longer necessary.
Issue #2:
outerLoop: foreach (var row in json) {
// ...
foreach(var cell in row.Cell) {
// ...
continue outerLoop;
}
}
Issue #3:
string[] keys = dict.keys();
int x = keys.reduce(
int(string previous /* type of 'previous' param */, string current) {
},
0 // and this type
);
In the above case, the two types must match. However, the type checker was inferring ‘external’ instead. This has been fixed in the latest release.
