Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 0.8.2
-
Fix Version/s: 0.9
-
Component/s: None
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
import System.Collections.Generic
def foo() as IEnumerator[of int]:
try:
print "test"
except e:
print "An exception occurred"
return
for i in range(5):
yield i
foo()
Boo Compiler version 0.8.2.2960 (CLR v2.0.50727.1433)
bug1.boo(6,3): BCE0055: Internal compiler error: Value cannot be null.
Parameter name: local.
1 error(s).
As posted on the list :
The attached patch fixes the problem.
For some reason, when the method is a generator (contains yield
statements), the 'local' used as the exception handler is not visited
and thus does not have a LocalBuilder handy.
I'm not commiting it yet since it is more a workaround hack than a
solution to the actual problem (the node not being visited), but well
have not much time to do it now and debugging a visitor pattern by
omission (code not run) is quite time-consuming :s