Source file test/fixedbugs/issue81990.go

     1  // run
     2  
     3  // Copyright 2026 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  // Issue 81990: folding the load of a type descriptor's Equal field
     8  // marked the type:.eqfunc.* closure as used in an interface, which
     9  // made the linker panic.
    10  
    11  package main
    12  
    13  import "reflect"
    14  
    15  type Info struct {
    16  	A any
    17  	B any
    18  }
    19  
    20  func main() {
    21  	if !reflect.TypeFor[Info]().Comparable() {
    22  		panic("Info should be comparable")
    23  	}
    24  }
    25  

View as plain text