Compiler Panic - interface conversion

100 views
Skip to first unread message

Stephen Illingworth

unread,
May 24, 2024, 9:08:51 AMMay 24
to golang-dev
Hi,

I'm in the middle of brute-force refactoring. Nothing elegant, just changing a concrete type to an interface and fixing the compiler errors as I go.

Unfortunately, I get this panic from the compiler:

hardware/vcs.go:242:2: internal compiler error: panic: interface conversion: types.Object is nil, not *ir.Name

Please file a bug report including a short program that triggers the error.


The line it's reporting on is the last entry of const block, which seems odd.

const (
ntscClock  = 1.193182
palClock   = 1.182298
palMClock  = 1.191870
secamClock = 1.187500
)

If I remove the constants then the panic moves to another location. Either way, this shouldn't be happening.


Without knowing exactly what's going on, I would imagine it's very difficult to write a short program that triggers the error.

How should I proceed with regards to a bug report?

Regards
Stephen

Than McIntosh

unread,
May 24, 2024, 9:18:16 AMMay 24
to Stephen Illingworth, golang-dev
Hi, 

Thanks for the shout-out.  From the error message it sounds as though perhaps you are running into a bug such as  https://github.com/golang/go/issues/50552 ? That bug has been fixed for a while, however, so if it is still happening with a current version of Go, we'll need to look into it.

To file a new issue, navigate to https://github.com/golang/go/issues and click on the "new issue" button. It will walk you through the steps needed, in particular how to report which version of Go you are using, and so on.

Cheers, Than


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/e9dfb80d-d231-4eae-8a58-dfb139246f57n%40googlegroups.com.

Stephen Illingworth

unread,
May 24, 2024, 11:13:14 AMMay 24
to golang-dev
Hi Than,

Thanks for the reply. I've posted the issue here https://github.com/golang/go/issues/67632

I was wondering if there was anything else I should do before submitting because it doesn't seem fair to reference the project as a whole in a github issue. But hopefully the cause will be easily found.

Regards
Stephen
Reply all
Reply to author
Forward
0 new messages