Source file test/fixedbugs/issue32454.go

     1  // compile
     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  
     7  package p
     8  
     9  type T struct {
    10  	s string
    11  	f float64
    12  }
    13  
    14  func f() {
    15  	var f float64
    16  	var st T
    17  	for {
    18  		switch &st.f {
    19  		case &f:
    20  			f = 1
    21  		}
    22  	}
    23  }
    24  

View as plain text