fix: set type correctly for variable declaration with assignment (#59)
Do not ignore type node when used in a variable declaration with assign. The source node in a assign node can be the 2nd or the 3rd (the 2nd being the type).
This commit is contained in:
committed by
Ludovic Fernandez
parent
73afc090bb
commit
63732d4326
@@ -185,7 +185,7 @@ func assignX(n *Node) {
|
||||
// assign implements single value assignment
|
||||
func assign(n *Node) {
|
||||
value := genValue(n)
|
||||
value1 := genValue(n.child[1])
|
||||
value1 := genValue(n.child[len(n.child)-1])
|
||||
next := getExec(n.tnext)
|
||||
|
||||
if n.child[0].typ.cat == InterfaceT {
|
||||
|
||||
Reference in New Issue
Block a user