mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
test: add regress test for #53619
Works with cmd/compile, but fails with gccgo currently. Updates #53619. Change-Id: I787faa9584cc33bd851c9cc8f146c91f4eb36fc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/415238 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
6a7c64fde5
commit
4d95fe6653
21
test/fixedbugs/issue53619.go
Normal file
21
test/fixedbugs/issue53619.go
Normal file
@ -0,0 +1,21 @@
|
||||
// run
|
||||
|
||||
// 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
|
||||
|
||||
var c = b
|
||||
var d = a
|
||||
|
||||
var a, b any = any(nil).(bool)
|
||||
|
||||
func main() {
|
||||
if c != false {
|
||||
panic(c)
|
||||
}
|
||||
if d != false {
|
||||
panic(d)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user