Source file test/fixedbugs/issue50190.go

     1  // run
     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  
     7  package main
     8  
     9  type Int = int
    10  
    11  type A = struct{ int }
    12  type B = struct{ Int }
    13  
    14  func main() {
    15  	var x, y interface{} = A{}, B{}
    16  	if x == y {
    17  		panic("FAIL")
    18  	}
    19  
    20  	{
    21  		type C = int32
    22  		x = struct{ C }{}
    23  	}
    24  	{
    25  		type C = uint32
    26  		y = struct{ C }{}
    27  	}
    28  	if x == y {
    29  		panic("FAIL")
    30  	}
    31  }
    32  

View as plain text