fjgandrade / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

When using dynamics, an additional "ctor" will be added. #352

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using dynamics, an additional "ctor" will be added - this is wrong.

C#
public class TChatClient
{
  internal void send(dynamic json = null) {
    json.auth_user = core.serverUserID;
  }
}

public static class core
{
  public static string serverUserID;
}

js output:
json.auth_user = test.core.ctor.serverUserID;

This will not occur, when you write "var int = core.serverUserID;".

Original issue reported on code.google.com by sebastia...@gmail.com on 5 Apr 2014 at 1:04