rtc icon indicating copy to clipboard operation
rtc copied to clipboard

Add support for Enumerators

Open jtoman opened this issue 13 years ago • 1 comments

A lot of our type signatures lose their expressiveness because we only support plain Enumerators. We should add support for Enumerators that are parameterized over a type. So Array<Fixnum>#each called with no arguments should yield a Enumerator<Fixnum>

This should be relatively straightforward, although figuring out how to do type inference on the contents of an Enumerator might be a little tricky.

jtoman avatar Oct 02 '12 16:10 jtoman

As an update, we've decided that enumerators are basically not inferenceable. That is, they can only be passed to positions where their type is required (such as foo: (Enumerator)) if they have been annotated.

jtoman avatar Oct 19 '12 16:10 jtoman