From 2e773a3894fba7af744090d7d42968f4993018e2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 22 Jun 2022 16:02:45 -0700 Subject: [PATCH] test: add test that causes gofrontend crash For #52846 Change-Id: I763f81def97b53277396c123c524f7b8193ea35e Reviewed-on: https://go-review.googlesource.com/c/go/+/413694 Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Cherry Mui TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- test/fixedbugs/issue52846.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/fixedbugs/issue52846.go diff --git a/test/fixedbugs/issue52846.go b/test/fixedbugs/issue52846.go new file mode 100644 index 0000000000..747fc885b4 --- /dev/null +++ b/test/fixedbugs/issue52846.go @@ -0,0 +1,17 @@ +// compile + +// Copyright 2022 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. + +// Issue 52846: gofrontend crashed with alias as map key type + +package p + +type S struct { + F string +} + +type A = S + +var M = map[A]int{A{""}: 0} -- 2.50.0