nikhilk/scriptsharp — Issue #137: No code generation for generic methods
Author: motmot80
Created: 2012-01-06 04:23:52+00:00
State: open

First I must say that the product seems very mature and has surpassed all my expectations. Thanks for publishing... Hoping that MS will support your product as Google supports GWT. Integration in ASP.NET would by great!!

But... : D

In Channel 9 you talked about the generic support (without it I would not have even tried to use it).

Using generic lists works fine but using generic method does not:

// Generates: myMethod: function JGR_MyClass$myMethod(myObj)
public object MyMethod(object myObj)
{
return myObj;
}

// Nothing generated / no error
public T MyGenericMethod(T myObj)
{
return myObj;
}

But the call to the generic method is generated

MyGenericMethod(string myObj);

I expected that Script# shows an error.
Without an error the code integrity is hurt.
IMHO there should be nothing special behind generic methods in JavaScript.
They should look like a none generic method:

myGenericMethod: function JGR_MyClass$myGenericMethod(myObj)

Thanks in advance and best regards,
Thomas