blob: 044b98c9bcecbc5870b163d4efbd8b9aeee9b404 [file] [log] [blame]
Dan Willemsenbc60c3c2021-12-15 01:09:00 -08001// compile
2
3// Copyright 2021 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 (
10 "fmt"
11 "strings"
12)
13
14type app struct {
15 Name string
16}
17
18func bug() func() {
19 return func() {
20
21 // the issue is this if true block
22 if true {
23 return
24 }
25
26 var xx = []app{}
27 var gapp app
28 for _, app := range xx {
29 if strings.ToUpper("") == app.Name {
30 fmt.Printf("%v\n", app)
31 gapp = app
32 }
33 }
34 fmt.Println(gapp)
35 }
36}
37
38func main() {
39 bug()
40}