mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-01 10:19:01 +00:00
compiler: test generated composite map hashes
This commit is contained in:
Vendored
+20
@@ -12,6 +12,11 @@ type nestedPadding struct {
|
||||
i int
|
||||
}
|
||||
|
||||
type stringStruct struct {
|
||||
a string
|
||||
b string
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func testZeroGet(m map[hasPadding]int, s hasPadding) int {
|
||||
return m[s]
|
||||
@@ -32,6 +37,21 @@ func testZeroArraySet(m map[[2]hasPadding]int, s [2]hasPadding) {
|
||||
m[s] = 5
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func makeStringStructMap() map[stringStruct]int {
|
||||
return make(map[stringStruct]int)
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func makeShortStringArrayMap() map[[2]string]int {
|
||||
return make(map[[2]string]int)
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func makeLongStringArrayMap() map[[5]string]int {
|
||||
return make(map[[5]string]int)
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user