# Problem with generic method resolution

**URL:** <https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440>\
**Category:** IronRuby\
**Created:** [March 10, 2009, 1:03am UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440 "2009-03-10T01:03:04Z")\
**Posts on this page:** 5\
**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 10, 2009, 1:03am UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440/1 "2009-03-10T01:03:04Z")

</div>

Hi,

I have found out the following problem:

> > > require ‘System.Core, Version=3.5.0.0, Culture=neutral,  
> > > PublicKeyToken=b77a5c561934e089’  
> > > =\> true
> 
> > > include System  
> > > =\> Object
> 
> > > include System::Linq::Expressions  
> > > Expression.Call  
> > > :0: wrong number of arguments (2 for 4) (ArgumentError)
> 
> > > Expression.Parameter  
> > > :0: undefined method `Parameter’ for TypeGroup of  
> > > Expression:Microsoft::Scripting::Actions::TypeGroup (NoMethodError)

Obviously the Call method was recognized but the Parameter one not.  
Should I  
file a bug or this is known and will be fixed?

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 17, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440/2 "2009-03-17T19:42:42Z")

</div>

Did anyone reply to you? If you haven’t submitted a bug on RubyForge,  
please do.

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Stefan D.  
Sent: Monday, March 09, 2009 7:57 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] Problem with generic method resolution

Hi,

I have found out the following problem:

> > > require ‘System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’  
> > > =\> true  
> > > include System  
> > > =\> Object  
> > > include System::Linq::Expressions  
> > > Expression.Call  
> > > :0: wrong number of arguments (2 for 4) (ArgumentError)  
> > > Expression.Parameter  
> > > :0: undefined method `Parameter’ for TypeGroup of  
> > > Expression:Microsoft::Scripting::Actions::TypeGroup (NoMethodError)

Obviously the Call method was recognized but the Parameter one not.  
Should I file a bug or this is known and will be fixed?

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 19, 2009, 1:38am UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440/3 "2009-03-19T01:38:57Z")

</div>

There are two different Expression classes in the Expressions namespace

- a templated one and an untemplated one. You need to force the  
untemplated one, which you can do by saying

System::Linq::Expressions::Expression.of().Parameter

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Stefan D.  
Sent: Wednesday, March 18, 2009 4:35 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Problem with generic method resolution

Nope. Nobody replied except you 🙂

Bug report is filed:  
[http://rubyforge.org/tracker/?func=detail&aid=24668&group\_id=4359&atid=16798](http://rubyforge.org/tracker/?func=detail&aid=24668&group_id=4359&atid=16798)  
2009/3/17 Jimmy S.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>

Did anyone reply to you? If you haven’t submitted a bug on RubyForge,  
please do.

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
On Behalf Of Stefan D.  
Sent: Monday, March 09, 2009 7:57 PM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] Problem with generic method resolution

Hi,

I have found out the following problem:

> > > require ‘System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’  
> > > =\> true  
> > > include System  
> > > =\> Object  
> > > include System::Linq::Expressions  
> > > Expression.Call  
> > > :0: wrong number of arguments (2 for 4) (ArgumentError)  
> > > Expression.Parameter  
> > > :0: undefined method `Parameter’ for TypeGroup of  
> > > Expression:Microsoft::Scripting::Actions::TypeGroup (NoMethodError)

Obviously the Call method was recognized but the Parameter one not.  
Should I file a bug or this is known and will be fixed?

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 19, 2009, 12:42am UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440/4 "2009-03-19T00:42:10Z")

</div>

Nope. Nobody replied except you 🙂

Bug report is filed:  
[http://rubyforge.org/tracker/?func=detail&aid=24668&group\_id=4359&atid=16798](http://rubyforge.org/tracker/?func=detail&aid=24668&group_id=4359&atid=16798)

2009/3/17 Jimmy S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<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 19, 2009, 2:07am UTC](https://www.ruby-forum.com/t/problem-with-generic-method-resolution/162440/5 "2009-03-19T02:07:00Z")

</div>

We’ll probably fix this so that if not specified otherwise the default  
would be the non-generic unless there is a catch 😉

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Curt  
Hagenlocher  
Sent: Wednesday, March 18, 2009 4:47 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Problem with generic method resolution

There are two different Expression classes in the Expressions namespace

- a templated one and an untemplated one. You need to force the  
untemplated one, which you can do by saying

System::Linq::Expressions::Expression.of().Parameter

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Stefan D.  
Sent: Wednesday, March 18, 2009 4:35 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Problem with generic method resolution

Nope. Nobody replied except you 🙂

Bug report is filed:  
[http://rubyforge.org/tracker/?func=detail&aid=24668&group\_id=4359&atid=16798](http://rubyforge.org/tracker/?func=detail&aid=24668&group_id=4359&atid=16798)  
2009/3/17 Jimmy S.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>

Did anyone reply to you? If you haven’t submitted a bug on RubyForge,  
please do.

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
On Behalf Of Stefan D.  
Sent: Monday, March 09, 2009 7:57 PM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] Problem with generic method resolution

Hi,

I have found out the following problem:

> > > require ‘System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’  
> > > =\> true  
> > > include System  
> > > =\> Object  
> > > include System::Linq::Expressions  
> > > Expression.Call  
> > > :0: wrong number of arguments (2 for 4) (ArgumentError)  
> > > Expression.Parameter  
> > > :0: undefined method `Parameter’ for TypeGroup of  
> > > Expression:Microsoft::Scripting::Actions::TypeGroup (NoMethodError)

Obviously the Call method was recognized but the Parameter one not.  
Should I file a bug or this is known and will be fixed?

Regards,  
Stefan
