infinite recursion is not always protected against
kortschak opened this issue · 5 comments
kortschak commented
See cznic/cc#54.
kortschak commented
Reproducer:
package main
import "github.com/kortschak/utter"
func main() {
r := make([]interface{}, 1)
r[0] = r
utter.Dump(r)
}
cznic commented
👍
kortschak commented
Also:
package main
import "github.com/kortschak/utter"
func main() {
r := make(map[int]interface{}, 1)
r[0] = r
utter.Dump(r)
}
cznic commented
What about my favorite singularity? ;-)
package main
import "github.com/kortschak/utter"
type t []t
func main() {
r := make(t, 1)
r[0] = r
utter.Dump(r)
}
kortschak commented
That works now. map[int]t
won't though.