compiler: allow to use type conversion in range
This commit is contained in:
parent
3af7ce8c6b
commit
74dda0ac66
2 changed files with 19 additions and 0 deletions
|
@ -102,6 +102,11 @@ func (c *funcScope) analyzeVoidCalls(node ast.Node) bool {
|
|||
}
|
||||
case *ast.BinaryExpr:
|
||||
return false
|
||||
case *ast.RangeStmt:
|
||||
ce, ok := n.X.(*ast.CallExpr)
|
||||
if ok {
|
||||
c.voidCalls[ce] = false
|
||||
}
|
||||
case *ast.IfStmt:
|
||||
// we can't just return `false`, because we still need to process body
|
||||
ce, ok := n.Cond.(*ast.CallExpr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue