mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
compiler: fix named string to []byte slice conversion
This was missing a `.Underlying()` call to avoid testing the named type (but instead test for the underlying type).
This commit is contained in:
committed by
Ron Evans
parent
e41e5106cc
commit
d4e04e4e49
Vendored
+3
@@ -17,8 +17,11 @@ func testRunesToString(r []rune) {
|
||||
println("string from runes:", string(r))
|
||||
}
|
||||
|
||||
type myString string
|
||||
|
||||
func main() {
|
||||
testRangeString()
|
||||
testStringToRunes()
|
||||
testRunesToString([]rune{97, 98, 99, 252, 162, 8364, 66376, 176, 120})
|
||||
var _ = len([]byte(myString("foobar"))) // issue 1246
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user