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
What steps will reproduce the problem?
1. Compile and run the attached source file
What is the expected output?
2
6
15
24
What do you see instead?
2
6
15
panic: interface conversion: interface is []interface { }, not int
runtime.panic+0xac /tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/proc.c:1028
runtime.panic(0x43f420, 0xf84001ed90)
assertE2Tret+0xfb /tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/iface.c:298
assertE2Tret(0x43d450, 0x440aa0, 0xf8400013a0, 0x7f277b262ed8, 0xf8400013a0, ...)
runtime.assertE2T+0x33
/tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/iface.c:280
runtime.assertE2T(0x43d450, 0x440aa0, 0xf8400013a0, 0x40743d)
main.Sum+0x88 /home/alexander/goprojects/variadic/variadic.go:20
main.Sum(0xf8400013b0, 0x100000001, 0x300000003, 0x440aa0, 0xf8400013a0, ...)
main.test4+0x135 /home/alexander/goprojects/variadic/variadic.go:48
main.test4()
main.main+0x27 /home/alexander/goprojects/variadic/variadic.go:55
main.main()
runtime.mainstart+0xf
/tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/proc.c:180
runtime.goexit()
----- goroutine created by -----
_rt0_amd64+0x8e /tmp/yaourt-tmp-alexander/aur-go-hg/src/go/src/pkg/runtime/amd64/asm.s:64
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
64-bit Arch Linux
Which revision are you using? (hg identify)
revision 7798
Please provide any additional information below.
I experienced this while trying to learn about "variadic".
Go was installed using this Arch Linux package:
http://aur.archlinux.org/packages.php?ID=33695
I also don't understand why uncommenting the Printf stops it from compiling, but that's
beside the point.
Thank you.
by rodseth:
Attachments:
The text was updated successfully, but these errors were encountered: