Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

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

Open
@ghost

Description

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions