Compiler Panic - interface conversion

Skip to first unread message

Stephen Illingworth

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

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?


Than McIntosh

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

Thanks for the shout-out.  From the error message it sounds as though perhaps you are running into a bug such as ? 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 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
To view this discussion on the web visit

Stephen Illingworth

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

Thanks for the reply. I've posted the issue here

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.

Reply all
Reply to author
0 new messages