Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linq Max apparently not supported #360

Open
GoogleCodeExporter opened this issue Oct 3, 2015 · 0 comments
Open

Linq Max apparently not supported #360

GoogleCodeExporter opened this issue Oct 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

The following code:

using SharpKit.JavaScript;
using SharpKit.Html;
using SharpKit.jQuery;
using System.Linq;
using System;

[JsType(JsMode.Global)]
public class TestClass
{
  public static void Test()
  {
    var x = new string[]{"0","1","2"};
    var max = x.Max(s=>Int32.Parse(s));
  } 
}

translates correctly to:

function Test()
{
    var x = ["0", "1", "2"];
    var max = System.Linq.Enumerable.Max$1$$IEnumerable$1$$Func$2(System.String.ctor, x, function (s)
    {
        return System.Int32.Parse$$String(s);
    });
};

which, however, fails to run because 
System.Linq.Enumerable.Max$1$$IEnumerable$1$$Func$2 is undefined.

Original issue reported on code.google.com by filp...@tin.it on 21 Jul 2014 at 3:54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant