File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ type Node interface {
1717 SetLocation (file.Location )
1818 Nature () nature.Nature
1919 SetNature (nature.Nature )
20- Kind () reflect.Kind
2120 Type () reflect.Type
2221 SetType (reflect.Type )
2322 String () string
@@ -57,15 +56,6 @@ func (n *base) SetNature(nature nature.Nature) {
5756 n .nature = nature
5857}
5958
60- // Kind returns the kind of the node.
61- // If the type is nil (meaning unknown) then it returns reflect.Interface.
62- func (n * base ) Kind () reflect.Kind {
63- if n .nature .Type == nil {
64- return reflect .Interface
65- }
66- return n .nature .Type .Kind ()
67- }
68-
6959// Type returns the type of the node.
7060func (n * base ) Type () reflect.Type {
7161 if n .nature .Type == nil {
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ func (c *compiler) IntegerNode(node *ast.IntegerNode) {
377377}
378378
379379func (c * compiler ) FloatNode (node * ast.FloatNode ) {
380- switch node .Kind () {
380+ switch node .Type (). Kind () {
381381 case reflect .Float32 :
382382 c .emitPush (float32 (node .Value ))
383383 case reflect .Float64 :
@@ -1199,7 +1199,7 @@ func (c *compiler) PairNode(node *ast.PairNode) {
11991199}
12001200
12011201func (c * compiler ) derefInNeeded (node ast.Node ) {
1202- switch node .Kind () {
1202+ switch node .Type (). Kind () {
12031203 case reflect .Ptr , reflect .Interface :
12041204 c .emit (OpDeref )
12051205 }
You can’t perform that action at this time.
0 commit comments