Some doubts about type conversion in go. In the following code, why can it be executed normally after passing the variable? The code is an error during the compilation phase.
// The following two lines of code can be executed normally x := uint64(256) fmt.Println(byte(uint64(x))) // normal execution // The following code cannot be executed normally fmt.Println(byte(uint64(256))) // constant 256 overflows byte Can anyone help me answer it? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/401197ca-1cdc-45e8-9135-bafe0a300e21n%40googlegroups.com.