Skip to content

Commit e0a05c2

Browse files
committed
[dev.typealias] cmd/gofmt: added test cases for alias type declarations
For #18130. Change-Id: I95e84130df40db5241e0cc25c36873c3281199ff Reviewed-on: https://go-review.googlesource.com/34987 Reviewed-by: Matthew Dempsky <[email protected]>
1 parent 2e5116b commit e0a05c2

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package q
2+
3+
import "p"
4+
5+
type _ = int
6+
type a = struct{ x int }
7+
type b = p.B
8+
9+
type (
10+
_ = chan<- int
11+
aa = interface{}
12+
bb = p.BB
13+
)
14+
15+
// TODO(gri) We may want to put the '=' into a separate column if
16+
// we have mixed (regular and alias) type declarations in a group.
17+
type (
18+
_ chan<- int
19+
_ = chan<- int
20+
aa0 interface{}
21+
aaa = interface{}
22+
bb0 p.BB
23+
bbb = p.BB
24+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package q
2+
3+
import "p"
4+
5+
type _ = int
6+
type a = struct{ x int }
7+
type b = p.B
8+
9+
type (
10+
_ = chan<- int
11+
aa = interface{}
12+
bb = p.BB
13+
)
14+
15+
// TODO(gri) We may want to put the '=' into a separate column if
16+
// we have mixed (regular and alias) type declarations in a group.
17+
type (
18+
_ chan<- int
19+
_ = chan<- int
20+
aa0 interface{}
21+
aaa = interface{}
22+
bb0 p.BB
23+
bbb = p.BB
24+
)

0 commit comments

Comments
 (0)