1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:20:03 -07:00

test: add test that caused gofrontend crash

The gofrontend crashed importing a complex 0 constant.

For #52862

Change-Id: Ia87d8eadb9c5ddf51e1cd65c1a626f05f0d068d4
Reviewed-on: https://go-review.googlesource.com/c/go/+/413980
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Ian Lance Taylor 2022-06-24 17:13:30 -07:00
parent a861eee51a
commit 155612a9b9
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// 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.
package a
func F() complex128 {
return 0+0i
}

View File

@ -0,0 +1,11 @@
// 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.
package b
import "./a"
func F() complex128 {
return a.F()
}

View File

@ -0,0 +1,9 @@
// compiledir
// 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.
// gofrontend crash importing a complex zero value.
package ignored