-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: prevent Noalg from breaking user types
Use a separate symbol for reflect metadata for types with Noalg set. Fixes #17752. Change-Id: Icb6cade7e3004fc4108f67df61105dc4085cd7e2 Reviewed-on: https://go-review.googlesource.com/32679 Reviewed-by: David Crawshaw <[email protected]> Run-TryBot: Matthew Dempsky <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// run | ||
|
||
// Copyright 2016 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
func f(m map[string]int) int { | ||
return m["a"] | ||
} | ||
|
||
func g(m map[[8]string]int) int { | ||
return m[[8]string{"a", "a", "a", "a", "a", "a", "a", "a"}] | ||
} | ||
|
||
func main() { | ||
m := map[[8]string]int{} | ||
g(m) | ||
} |