Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

loop endless when handling recursive types #19

Closed
minux opened this issue Dec 23, 2012 · 4 comments
Closed

loop endless when handling recursive types #19

minux opened this issue Dec 23, 2012 · 4 comments

Comments

@minux
Copy link
Contributor

minux commented Dec 23, 2012

package f
type T *T
func f() T { return new(T) }

PS: gotypes at tip can handle this case just fine.

@minux
Copy link
Contributor Author

minux commented Dec 23, 2012

llvm doesn't allow non-struct types to be recursive, i wonder if we should always
wrap go types in llvm struct types.

%T = type { %T* }

ps: if you prefer, i can post these kind of issue discussions to llgo-dev.

@axw
Copy link
Member

axw commented Dec 24, 2012

Discussing bugs here is fine. What is the point of that type?
I don't like the thought of wrapping everything in a struct, so I'd like to investigate a bit further.

@minux
Copy link
Contributor Author

minux commented Dec 24, 2012

for a concrete example of that type, see http://tip.golang.org/doc/play/peano.go

@axw
Copy link
Member

axw commented Dec 24, 2012

Thanks. I should've remembered Peano, I just read GEB recently.
On second thought, let's take it to llgo-dev. This one will need a bit of
discussion. I've not come up with any good workarounds so far.

On Mon, Dec 24, 2012 at 3:18 PM, minux notifications@github.com wrote:

for a concrete example of that type, see
http://tip.golang.org/doc/play/peano.go


Reply to this email directly or view it on GitHubhttps://github.com/axw/llgo/issues/19#issuecomment-11655528.

Andrew Wilkins
http://awilkins.id.au

@axw axw closed this as completed in 35e06c1 May 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants