github.com/goplus/igop@v0.25.0/testdata/issue23536.go (about)

     1  package main
     2  
     3  // Test case where a slice of a user-defined byte type (not uint8 or byte) is
     4  // converted to a string.  Same for slice of runes.
     5  
     6  type MyByte byte
     7  
     8  type MyRune rune
     9  
    10  func main() {
    11  	var y = []MyByte("hello")
    12  	if string(y) != "hello" {
    13  		panic("BUG")
    14  	}
    15  
    16  	var z = []MyRune("world")
    17  	if string(z) != "world" {
    18  		panic("BUG")
    19  	}
    20  }