Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Fixes https://github.com/tinygo-org/tinygo/issues/2749
|
|
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.
|
|
|
|
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.
|
|
This feature was introduced in Go 1.2 and is used by some standard
library packages.
|
|
This avoids difficult multiply-with-overflow code and avoids a multiply
at runtime.
|
|
|
|
|
|
|
|
Make sure the compiler will correctly compile indexes of type uint64,
for example.
|
|
|
|
|
|
|