boo-lang / boo

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

Generic Generator methods don't work #123

Closed BitPuffin closed 7 years ago

BitPuffin commented 9 years ago
import System.Collections.Generic
def ggm[of T](l as IEnumerable[of T]) as IEnumerator[of T]:
    for e in l:
        yield e
Boo Compiler version 0.9.7.0 (CLR 2.0.50727.8009)
Main.boo(2,5): BCE0055: Internal compiler error: Failed to create 'MainModule.$ggm$2' type..
1 error(s).

More discussion: https://groups.google.com/forum/#!topic/boolang/B7glLpCci-M

masonwheeler commented 8 years ago

Any progress on this?

We've got a couple test cases marked [Ignore] with messages indicating that generic generators are not supported yet, but there's nothing in the compiler to reject them as not supported. The compiler seems to be accepting them and attempting to create code for them, and then failing.

masonwheeler commented 7 years ago

This is now fixed in the CCI branch. There's still one more generic generator test case that's not working. (I un-ignored them now that I'm getting support for them set up.) Once I get that fixed, I'll merge those fixes into Master and we'll have a working generic generator implementation! :)

masonwheeler commented 7 years ago

Fixed in Master now.