You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. What is a short input program that triggers the error?
package main
func A() bool { return false }
func B() (_ bool) { return false }
func C() (ok bool) { return false }
var funcs = []interface{} {A, B, C}
func main() {
for i, f := range funcs {
println(i)
_ = f.(func()bool)
}
}
2. What is the full compiler output?
0
1
2
panic: interface conversion: interface is func() (bool), not func() bool
*stack trace omitted*
3. What version of the compiler are you using? (Run it with the -V flag.)
8g version 5289 release.2010-04-13 release
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: