# Support for generic types of interfaces

**URL:** <https://www.ruby-forum.com/t/support-for-generic-types-of-interfaces/162341>\
**Category:** IronRuby\
**Created:** [March 8, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/support-for-generic-types-of-interfaces/162341 "2009-03-08T23:41:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan8107](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b77776/32.png) [@stefan8107](https://www.ruby-forum.com/u/stefan8107)\
**Post date:** [March 8, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/support-for-generic-types-of-interfaces/162341/1 "2009-03-08T23:41:06Z")

</div>

Hi

I have found out that there is a problem if you tried to create a  
generic  
type of some interface. Here is an example:

> > require ‘System’  
> > include System  
> > include System::Collections::Generic  
> > List.of(ICloneable).new

Looking at the stack trace and debugging with VS I was able to implement  
a  
quick patch that is attached.

Regards,  
Stefan

---

<div class="post-metadata">

**Author:** ![stefan8107](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b77776/32.png) [@stefan8107](https://www.ruby-forum.com/u/stefan8107)\
**Post date:** [March 9, 2009, 7:27am UTC](https://www.ruby-forum.com/t/support-for-generic-types-of-interfaces/162341/2 "2009-03-09T07:27:55Z")

</div>

RubyModule should rather implement GetUnderlyingSystemType for  
interfaces. I have the change almost ready (along with other fixes).

Thanks for the patch anyways!  
Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Stefan D.  
Sent: Sunday, March 08, 2009 2:53 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] Support for generic types of interfaces

Hi

I have found out that there is a problem if you tried to create a  
generic type of some interface. Here is an example:

> > require ‘System’  
> > include System  
> > include System::Collections::Generic  
> > List.of(ICloneable).new

Looking at the stack trace and debugging with VS I was able to implement  
a quick patch that is attached.

Regards,  
Stefan
