Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite recursion is not always protected against #5

Closed
kortschak opened this issue Sep 22, 2016 · 5 comments
Closed

infinite recursion is not always protected against #5

kortschak opened this issue Sep 22, 2016 · 5 comments

Comments

@kortschak
Copy link
Owner

See cznic/cc#54.

@kortschak
Copy link
Owner Author

kortschak commented Sep 22, 2016

Reproducer:

package main

import "github.com/kortschak/utter"

func main() {
    r := make([]interface{}, 1)
    r[0] = r
    utter.Dump(r)
}

@cznic
Copy link

cznic commented Sep 22, 2016

👍

@kortschak
Copy link
Owner Author

Also:

package main

import "github.com/kortschak/utter"

func main() {
    r := make(map[int]interface{}, 1)
    r[0] = r
    utter.Dump(r)
}

@cznic
Copy link

cznic commented Sep 23, 2016

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
Copy link
Owner Author

That works now. map[int]t won't though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants