From bb2a96b79df71c4b021c8611b916a2f402166d3b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 8 Oct 2022 11:17:47 -0700 Subject: [PATCH] test: add test case that caused a bogus error from gofrontend For #56109 Change-Id: I999763e463fac57732a92f5e396f8fa8c35bd2e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/440297 TryBot-Result: Gopher Robot Reviewed-by: Than McIntosh Run-TryBot: Ian Lance Taylor Reviewed-by: Cherry Mui Auto-Submit: Ian Lance Taylor --- test/fixedbugs/issue56109.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/fixedbugs/issue56109.go diff --git a/test/fixedbugs/issue56109.go b/test/fixedbugs/issue56109.go new file mode 100644 index 0000000000..68e09b1332 --- /dev/null +++ b/test/fixedbugs/issue56109.go @@ -0,0 +1,18 @@ +// 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. + +package main + +import "math" + +func main() { + f := func(p bool) { + if p { + println("hi") + } + } + go f(true || math.Sqrt(2) > 1) +} -- 2.50.0