Source file test/typeparam/issue52117.dir/a.go

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package a
     6  
     7  func Compare[T int | uint](a, b T) int {
     8  	return 0
     9  }
    10  
    11  type Slice[T int | uint] struct{}
    12  
    13  func (l Slice[T]) Comparator() func(v1, v2 T) int {
    14  	return Compare[T]
    15  }
    16  

View as plain text