[Ironruby-core] calling non generic method that has a generic overload

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Jul 30 11:04:17 EDT 2009


You can also list the overloads IronRuby knows of like so:

>>> puts System::Console.method(:write_line).clr_members
Void WriteLine()
Void WriteLine(Boolean)
Void WriteLine(Char)
Void WriteLine(Char[])
Void WriteLine(Char[], Int32, Int32)
Void WriteLine(System.Decimal)
Void WriteLine(Double)
Void WriteLine(Single)
Void WriteLine(Int32)
Void WriteLine(UInt32)
Void WriteLine(Int64)
Void WriteLine(UInt64)
Void WriteLine(System.Object)
Void WriteLine(System.String)
Void WriteLine(System.String, System.Object)
Void WriteLine(System.String, System.Object, System.Object)
Void WriteLine(System.String, System.Object, System.Object, System.Object)
Void WriteLine(System.String, System.Object, System.Object, System.Object, System.Object, ...)
Void WriteLine(System.String, System.Object[])
=> nil
>>>

Could you send the list of overloads of method "list"?

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall
Sent: Thursday, July 30, 2009 7:40 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] calling non generic method that has a generic overload

Hi Michael,

I'm planning to look at NHibernate and IronRuby on Saturday, but some initial debugging questions....

1) Is .List an extension method on ISQLQuery ? If so, they are not support as of yet in.
2) If you use the commands puts query.methods - what methods do you see listed?

Thanks

Ben


On Thu, Jul 30, 2009 at 12:25 PM, Michael Delaney<lists at ruby-forum.com> wrote:
> hi guys,
> i'm trying to using IR with NHibernate so i can a nice REPL experience.
>
> the issue i'm having is that I'm calling a method List() on the class
> ISQLQuery, which returns an IList, but ISQLQuery also has a generic
> overload List<T>().
>
>>>> sql = "some sql... etc"
>>>> query = qm.Session.CreateSQLQuery(sql) list = query.list
> :0: generic arguments could not be infered for method 'list'
> (ArgumentError)
>
> i did a print of all the methods on the query class and it has a
> single 'list' method.
>
> i'm on edge ironruby, refreshed just 1 hour ago.
>
> any ideas?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list