@@ -36,12 +36,12 @@ var compareTests = [][]reflect.Value{
3636 ct (reflect .TypeOf (chans [0 ]), chans [0 ], chans [1 ], chans [2 ]),
3737 ct (reflect .TypeOf (toy {}), toy {0 , 1 }, toy {0 , 2 }, toy {1 , - 1 }, toy {1 , 1 }),
3838 ct (reflect .TypeOf ([2 ]int {}), [2 ]int {1 , 1 }, [2 ]int {1 , 2 }, [2 ]int {2 , 0 }),
39- ct (reflect .TypeOf (interface {}( interface {} (0 ))), iFace , 1 , 2 , 3 ),
39+ ct (reflect .TypeOf (any ( any (0 ))), iFace , 1 , 2 , 3 ),
4040}
4141
42- var iFace interface {}
42+ var iFace any
4343
44- func ct (typ reflect.Type , args ... interface {} ) []reflect.Value {
44+ func ct (typ reflect.Type , args ... any ) []reflect.Value {
4545 value := make ([]reflect.Value , len (args ))
4646 for i , v := range args {
4747 x := reflect .ValueOf (v )
@@ -82,9 +82,9 @@ func TestCompare(t *testing.T) {
8282}
8383
8484type sortTest struct {
85- data interface {} // Always a map.
86- print string // Printed result using our custom printer.
87- printBrokenNaNs string // Printed result when NaN support is broken (pre Go1.12).
85+ data any // Always a map.
86+ print string // Printed result using our custom printer.
87+ printBrokenNaNs string // Printed result when NaN support is broken (pre Go1.12).
8888}
8989
9090var sortTests = []sortTest {
@@ -132,7 +132,7 @@ var sortTests = []sortTest{
132132 },
133133}
134134
135- func sprint (data interface {} ) string {
135+ func sprint (data any ) string {
136136 om := fmtsort .Sort (reflect .ValueOf (data ))
137137 if om == nil {
138138 return "nil"
@@ -219,7 +219,7 @@ func TestInterface(t *testing.T) {
219219 // A map containing multiple concrete types should be sorted by type,
220220 // then value. However, the relative ordering of types is unspecified,
221221 // so test this by checking the presence of sorted subgroups.
222- m := map [interface {} ]string {
222+ m := map [any ]string {
223223 [2 ]int {1 , 0 }: "" ,
224224 [2 ]int {0 , 1 }: "" ,
225225 true : "" ,
0 commit comments