daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type myByte byte
  2.  
  3. func main() {
  4.  
  5.     var a byte
  6.     var b myByte
  7.  
  8.     a = b       // Complies error: cannot use b (type myByte) as type byte in assignment
  9.     a = byte(b) // OK
  10. }
  11.    
  12. func main() {
  13.  
  14.     var a byte
  15.     var b uint8
  16.  
  17.     a = b // OK
  18.     b = a // OK
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top