![]() When doing a slice operation on a slice, use the capacity value instead of the length. Of course, for strings and arrays, the slice operation checks the length because there is no capacity. But according to the spec, this check should be based on cap for slice instead of len: > For slices, the upper index bound is the slice capacity cap(a) rather > than the length. https://golang.org/ref/spec#Slice_expressions Fixes: https://github.com/aykevl/tinygo/issues/65 |
||
---|---|---|
.. | ||
calls.go | ||
compiler.go | ||
map.go | ||
optimizer.go | ||
sizes.go |