File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,19 @@ import (
7
7
)
8
8
9
9
func init () {
10
- funcMap [string (DoOp )] = & DoOp
10
+ opName := doOp ("do" )
11
+ DoOp = & opName
12
+ funcMap ["do" ] = DoOp
11
13
}
12
14
13
15
type doOp string
14
16
15
17
// DoOp is "do" operation
16
- var DoOp doOp = "do"
18
+ var DoOp * doOp
17
19
18
20
// String returns operator name
19
21
func (* doOp ) String () string {
20
- return string (DoOp )
22
+ return string (* DoOp )
21
23
}
22
24
23
25
// Bind binds its arguments, and check if the types of values are correct.
@@ -30,7 +32,7 @@ func (*doOp) Bind(args ...types.Value) (*types.Expr, error) {
30
32
return nil , err
31
33
}
32
34
retType := args [len (args )- 1 ].Type ()
33
- return types .NewExpr (& DoOp , args , retType ), nil
35
+ return types .NewExpr (DoOp , args , retType ), nil
34
36
}
35
37
36
38
// InvertExpr returns inverted expression: Call Value.Invert() for each argument,
You can’t perform that action at this time.
0 commit comments