mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
Fix var statements inside an else-if.
This commit is contained in:
1 parent
321ebf8617
commit
9d0558df5a
5 files changed
+64
-40
No files matched your search
+5
-7
@@ -343,13 +343,11 @@ func (c *Checker) checkFuncBody(node *a.Node) error {
|
||||
// Fill in the TypeMap with all local variables. Note that they have
|
||||
// function scope and can be hoisted, JavaScript style, a la
|
||||
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/var
|
||||
for _, o := range n.Body() {
|
||||
if err := q.tcheckVars(o); err != nil {
|
||||
return &Error{
|
||||
Err: err,
|
||||
Filename: q.errFilename,
|
||||
Line: q.errLine,
|
||||
}
|
||||
if err := q.tcheckVars(n.Body()); err != nil {
|
||||
return &Error{
|
||||
Err: err,
|
||||
Filename: q.errFilename,
|
||||
Line: q.errLine,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user