Daniel Hoelbling-Inzko talks about programming
Today I ran into a very interesting compiler error in my go program: int is not a type
. Although the same lines of code that didn't compile worked a few minutes earlier.
It took me 20 minutes to figure it out. I was already halfway through a forum post on the golangbridge forums and trying to put together a minimal example when I noticed the problem. Apparently I had a typo in mit func init()
and had inadvertently called it func int()
!
The go compiler didn't even complain with me overriding one of it's core types.