boo-lang / boo

The Boo Programming Language.
BSD 3-Clause "New" or "Revised" License
874 stars 148 forks source link

ProcessMethodBodies can produce multiple duplicates of the same closure #96

Closed masonwheeler closed 6 years ago

masonwheeler commented 10 years ago

The ProcessClosureBody method within ProcessMethodBodies is called from a LINQ query that iterates over a list of possible candidates. It starts with MarkVisited(node);, but neglects to put a WasVisited guard before that, which means that the code below it that calls CodeBuilder.CreateMethod and then CurrentMethod.DeclaringType.Members.Add(closure); can run multiple times for the same closure.

masonwheeler commented 6 years ago

This has been fixed somewhere in the last 4 years.