Source file test/fixedbugs/issue40152.go
1 // run 2 3 // Copyright 2020 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 // Gccgo mishandles converting an untyped boolean to an interface type. 8 9 package main 10 11 func t(args ...interface{}) bool { 12 x := true 13 return x == args[0] 14 } 15 16 func main() { 17 r := t("x" == "x" && "y" == "y") 18 if !r { 19 panic(r) 20 } 21 } 22