aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/slice.go
AgeCommit message (Collapse)Author
2023-03-18compiler: support all kinds of recursive typesAyke van Laethem
Previously we only supported recursive types in structs. But there can be other kinds of recursive types, like slices: type RecursiveSlice []RecursiveSlice This doesn't involve structs, so it led to infinite recursion in the compiler. This fix avoids recursion at the proper level: at the place where the named type is defined.
2022-08-30all: drop support for Go 1.16 and Go 1.17Ayke van Laethem
2022-04-07compiler: allow slices of empty structs.Dan Kegel
Fixes https://github.com/tinygo-org/tinygo/issues/2749
2020-05-27compiler: fix a few crashes due to named typesAyke van Laethem
There were a few cases left where a named type would cause a crash in the compiler. While going through enough code would have found them eventually, I specifically looked for the `Type().(` pattern: a Type() call that is then used in a type assert. Most of those were indeed bugs, although for some I couldn't come up with a reproducer so I left them as-is.
2019-10-01compiler: support constant indices with a named typeAyke van Laethem
2019-08-11compiler: add support for full slice expression for slicing arraysAyke van Laethem
This was an oversight in the main commit for full slice expressions: https://github.com/tinygo-org/tinygo/pull/472 This syntax is used by the regexp package, for example.
2019-08-04compiler: implement full slice expressionAyke van Laethem
This feature was introduced in Go 1.2 and is used by some standard library packages.
2019-03-05compiler: calculate max number of entries in slice at compile timeAyke van Laethem
This avoids difficult multiply-with-overflow code and avoids a multiply at runtime.
2019-01-31all: update import paths to github.com/tinygo-org/tinygoAyke van Laethem
2019-01-04compiler: allow slicing arrays of a named typeKonstantin Yegupov
2018-11-18compiler: support creating slices with uncommon initial len/cap typesAyke van Laethem
2018-11-14compiler: support any int type in slice indexesAyke van Laethem
Make sure the compiler will correctly compile indexes of type uint64, for example.
2018-10-20compiler: compare slice against nilAyke van Laethem
2018-10-19compiler: add support for the append builtinAyke van Laethem
2018-10-18test: add slice testsAyke van Laethem