[Mono-list] [gmcs] RemoveGenericArity question

DraconisBG draconisbg at yahoo.com
Fri Oct 17 19:25:52 EDT 2008


Hello,

I thought there were a gmcs/compiler forum but I must be wrong then, so I
ask the question here.

My task has to do with the Mono C# Compiler (gmcs), and I noticed that it
calls RemoveGenericArity (during the parsing phase) also when an Invocation
class is being instantiated for a generic call like this:

GMethod<double>();

As far as I can see, first (more precisely, after certain steps) it finds
that GMethod<double> is a type_name, so the generic name it generates
includes `1 (that is, the name is GMethod`1) and when it recognizes the
Invocation due to () and reduces, it calls RemoveGenericArity and produces
GMethod name from it.

Is this because generic method names don't need to include the arity number
(as opposed to type names) but the compiler doesn't know it first that it's
an invocation, it just sees a typename (GMethod`1)?

Thank you in advance
-- 
View this message in context: http://www.nabble.com/-gmcs--RemoveGenericArity-question-tp20042518p20042518.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list