Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread 'Sean Liao' via golang-nuts
see https://go.dev/issue/6703 and https://go.dev/ref/spec#Package_initialization initialization order is based on lexical references rather than a full analysis. - sean On Sun, Apr 20, 2025, 22:40 Wilgnert wrote: > Hey there! So, I was about to file a GitHub issue, but the prompt > suggested ch

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
Oh, whoops, I did not realize the attachments contained examples... I suppose you could delay the commandRegistry assignment to be within `func init()` Attached is an example of this. On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
What is the actual error the compiler is reporting? Are you perhaps trying to iterate over a pointer to a map or something like that? On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested checking here first to avoid duplicates. I did a qu