Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Incorrect Verbatim.Expression with dynamic parameter translation #548

Description

@iskiselev

JSIL doesn't replace Verbatim.Expression if you pass dynamic parameter to it. Here is test case:

using System;
using JSIL;

public static class Program {
    public static void Main (string[] args)
    {
        var obj1 = Verbatim.Expression("{}");
        var obj2 = Verbatim.Expression("{obj1: $0}", obj1);
    }
}

Translation:

  var $T02 = function () {
    return ($T02 = JSIL.Memoize($asm02.JSIL.Verbatim)) ();
  };

  function Program_Main (args) {
    var obj = ({});
    var obj2 = $T02().Expression("{obj1: $0}", obj);
  };

There is easy workaround - we just need to cast obj1 to object on second line, but it may take a lot of time to understand, why it doesn't work.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions