History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-861
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Rodrigo B. de Oliveira
Reporter: Rodrigo B. de Oliveira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

generator with post condition gives invalid code

Created: 19/Aug/07 07:36 AM   Updated: 19/Aug/07 08:58 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
>>> class Foo:
... counter = 0
... def GetTick():
... yield 0
... if --counter < 0:
... print "Hello"
...
>>> f = Foo()
Foo
>>> join(f.GetTick(), '')
>>> join(f.GetTick(), '')
System.InvalidProgramException: Common Language Runtime detected an invalid prog
ram.
at CompilerGenerated.GetTick___generator1_Enumerator.MoveNext()
at Boo.Lang.Builtins.join(IEnumerable enumerable, String separator) in c:\pro
jects\boo\src\Boo.Lang\Builtins.cs:line 76
at Input3Module.Main(String[] argv)
>>>

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Rodrigo B. de Oliveira - 19/Aug/07 08:58 AM
Fixed in the repository.