Debian Codegraph @

apidiff/testdata/aliases.go

raw symbols SCIP
1 package p
2
3 // Here the same alias refers to different types in old and new.
4 // We correctly detect the problem, but the message is poor.
5
6 // both
7 type t1 int
8 type t2 bool
9
10 // old
11 type A = t1
12
13 // new
14 // i t1: changed from int to bool
15 type A = t2
16
17 // old
18 type B = int
19
20 // new
21 // i B: changed from int to B
22 type B int
23
24 // old
25 type C int
26
27 // new
28 // OK: merging types
29 type C = int
30
31 // both
32 // OK: identical (but this fails on 07ab4e7)
33 type TypedBucketRateLimiter[T comparable] struct{}
34 type BucketRateLimiter = TypedBucketRateLimiter[any]