Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for SameRules (0.14 sec)

  1. src/internal/types/testdata/fixedbugs/issue60460.go

    type Rules[T any] interface {
    	Hash(T) int
    	Equivalent(T, T) bool
    	SameRules(Rules[T]) bool
    }
    
    type testRules struct{}
    
    func newTestRules() Rules[int] {
    	return testRules{}
    }
    
    func (r testRules) Hash(val int) int {
    	return val % 16
    }
    
    func (r testRules) Equivalent(val1 int, val2 int) bool {
    	return val1 == val2
    }
    
    func (r testRules) SameRules(other Rules[int]) bool {
    	_, ok := other.(testRules)
    	return ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 30 20:19:38 UTC 2023
    - 1.3K bytes
    - Viewed (0)
Back to top