Commit 882d16d1 authored by HoytKoepke's avatar HoytKoepke

Annotation fix when no else clause.

parent 7c0ea3b0
......@@ -3041,7 +3041,7 @@ class SwitchCaseNode(StatNode):
def annotate(self, code):
for cond in self.conditions:
cond.annotate(code)
body.annotate(code)
self.body.annotate(code)
class SwitchStatNode(StatNode):
# Generated in the optimization of an if-elif-else node
......@@ -3065,7 +3065,8 @@ class SwitchStatNode(StatNode):
self.test.annotate(code)
for case in self.cases:
case.annotate(code)
self.else_clause.annotate(code)
if self.else_clause is not None:
self.else_clause.annotate(code)
class LoopNode:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment