]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test case that caused a bogus error from gofrontend
authorIan Lance Taylor <iant@golang.org>
Sat, 8 Oct 2022 18:17:47 +0000 (11:17 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 10 Oct 2022 21:47:48 +0000 (21:47 +0000)
For #56109

Change-Id: I999763e463fac57732a92f5e396f8fa8c35bd2e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/440297
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

test/fixedbugs/issue56109.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue56109.go b/test/fixedbugs/issue56109.go
new file mode 100644 (file)
index 0000000..68e09b1
--- /dev/null
@@ -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)
+}