1// run
2
3// Copyright 2019 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
7package main
8
9import "fmt"
10
11//go:noinline
12func ident(s string) string { return s }
13
14func returnSecond(x bool, s string) string { return s }
15
16func identWrapper(s string) string { return ident(s) }
17
18func main() {
19	got := returnSecond((false || identWrapper("bad") != ""), ident("good"))
20	if got != "good" {
21		panic(fmt.Sprintf("wanted \"good\", got \"%s\"", got))
22	}
23}
24