...

Text file src/cmd/go/testdata/script/build_issue59571.txt

Documentation: cmd/go/testdata/script

     1# Regression test for https://go.dev/issue/59571
     2# Build should be reproducible, even with aliased generic types.
     3
     4go build -a -o 1.a
     5go build -a -o 2.a
     6cmp -q 1.a 2.a
     7
     8-- go.mod --
     9module m
    10
    11go 1.20
    12-- m.go --
    13package m
    14
    15type (
    16	SliceFlag[T any] struct{}
    17
    18	Alias1  = SliceFlag[[1]int]
    19	Alias2  = SliceFlag[[2]int]
    20	Alias3  = SliceFlag[[3]int]
    21	Alias4  = SliceFlag[[4]int]
    22	Alias5  = SliceFlag[[5]int]
    23	Alias6  = SliceFlag[[6]int]
    24	Alias7  = SliceFlag[[7]int]
    25	Alias8  = SliceFlag[[8]int]
    26	Alias9  = SliceFlag[[9]int]
    27	Alias10 = SliceFlag[[10]int]
    28	Alias11 = SliceFlag[[11]int]
    29	Alias12 = SliceFlag[[12]int]
    30	Alias13 = SliceFlag[[13]int]
    31	Alias14 = SliceFlag[[14]int]
    32	Alias15 = SliceFlag[[15]int]
    33	Alias16 = SliceFlag[[16]int]
    34	Alias17 = SliceFlag[[17]int]
    35	Alias18 = SliceFlag[[18]int]
    36	Alias19 = SliceFlag[[19]int]
    37	Alias20 = SliceFlag[[20]int]
    38)
    39
    40func (x *SliceFlag[T]) String() string { return "zzz" }

View as plain text