boo-lang / boo

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

Problem with generic constraints on a generic specialization of the same type #200

Open masonwheeler opened 5 years ago

masonwheeler commented 5 years ago
class Foo[of T(IComparable[of T])]:
    pass

Foo[of int]() // error occurs here

Expected: This should work, as Int32 implements IComparable<Int32>. Observed: The generic type checker errors out here, as it incorrectly checks whether int implements the generic IComparable[of T], rather than the reified IComparable[of int].