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

Functions with 5 or more params fail in with(...) context #85

Open
einaregilsson opened this issue Aug 16, 2011 · 0 comments
Open

Functions with 5 or more params fail in with(...) context #85

einaregilsson opened this issue Aug 16, 2011 · 0 comments
Assignees
Labels
Milestone

Comments

@einaregilsson
Copy link

Any function with 5 or more parameters fails with a "Parameter Count Mismatch" error when you call it in a with(...) context. Example code:

        var ctx = new IronJS.Hosting.CSharp.Context();
        ctx.Execute(
            @"
var x = {
  func0 : function() {},
  func1 : function(a) {},
  func2 : function(a,b) {},
  func3 : function(a,b,c) {},
  func4 : function(a,b,c,d) {},
  func5 : function(a,b,c,d,e) {},
  func6 : function(a,b,c,d,e,f) {},
};");

        ctx.Execute("with(x) { func0(); }");
        ctx.Execute("with(x) { func1(1); }");
        ctx.Execute("with(x) { func2(1,2); }");
        ctx.Execute("with(x) { func3(1,2,3); }");
        ctx.Execute("with(x) { func4(1,2,3,4); }");
        ctx.Execute("x.func5(1,2,3,4,5)");
        ctx.Execute("with(x) { func5(1,2,3,4,5); }"); //<-- Fails
        ctx.Execute("x.func6(1,2,3,4,5,6)");
        ctx.Execute("with(x) { func6(1,2,3,4,5,6); }"); //<-- Fails
@ghost ghost assigned fholm Aug 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant