You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first glance it should simply be a matter of adding *types.Basic (with .Kind() == types.String) to the case where we handle *types.Array and *types.Slicehere, however range loops are a bit different when strings are involved. When indexing a string you get back a byte. When using a for range loop with a string you get a rune along with an index representing its offset in the string. More info in https://go.dev/blog/strings.
The desugaring pass should use utf.DecodeRuneInString to parse runes from strings iteratively.
Activity
chriso commentedon Dec 16, 2023
Test case: