github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/type30.gno (about) 1 package main 2 3 type String string 4 5 func equal(a, b string) bool { 6 return a == b 7 } 8 9 func main() { 10 x := "dontcare" 11 if !equal(x, x) { 12 panic("should not happen") 13 } 14 y := String(x) 15 println(equal(x, y)) 16 } 17 18 // Error: 19 // main/files/type30.gno:15: cannot use main.String as string without explicit conversion