Source file test/fixedbugs/bug427.go

     1  // compile
     2  
     3  // Copyright 2012 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  // https://golang.org/issue/3351
     8  
     9  package main
    10  
    11  // struct with four fields of basic type
    12  type S struct {a, b, c, d int}
    13  
    14  // struct with five fields of basic type
    15  type T struct {a, b, c, d, e int}
    16  
    17  // array with four elements
    18  type A [4]int
    19  
    20  // array with five elements
    21  type B [5]int
    22  
    23  func main() {
    24  	var i interface{}
    25  
    26  	var s1, s2 S
    27  	i = s1 == s2
    28  
    29  	var t1, t2 T
    30  	i = t1 == t2
    31  
    32  	var a1, a2 A
    33  	i = a1 == a2
    34  
    35  	var b1, b2 B
    36  	i = b1 == b2
    37  
    38  	_ = i
    39  }
    40  

View as plain text