File tree 1 file changed +5
-7
lines changed
src/cmd/compile/internal/importer
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ package importer
8
8
9
9
import (
10
10
"cmd/compile/internal/base"
11
+ "cmd/compile/internal/types"
11
12
"cmd/compile/internal/types2"
12
13
"fmt"
13
14
"go/token"
@@ -23,8 +24,6 @@ func errorf(format string, args ...interface{}) {
23
24
panic (fmt .Sprintf (format , args ... ))
24
25
}
25
26
26
- const deltaNewFile = - 64 // see cmd/compile/internal/gc/bexport.go
27
-
28
27
// Synthesize a token.Pos
29
28
type fakeFileSet struct {
30
29
fset * token.FileSet
@@ -67,13 +66,12 @@ var (
67
66
)
68
67
69
68
func chanDir (d int ) types2.ChanDir {
70
- // tag values must match the constants in cmd/compile/internal/gc/go.go
71
- switch d {
72
- case 1 /* Crecv */ :
69
+ switch types .ChanDir (d ) {
70
+ case types .Crecv :
73
71
return types2 .RecvOnly
74
- case 2 /* Csend */ :
72
+ case types . Csend :
75
73
return types2 .SendOnly
76
- case 3 /* Cboth */ :
74
+ case types . Cboth :
77
75
return types2 .SendRecv
78
76
default :
79
77
errorf ("unexpected channel dir %d" , d )
You can’t perform that action at this time.
0 commit comments