This is the source file
    
    
    import jsffi
    
    var console {.importc, nodecl.}: JsObject
    
    type Person = object
      name: string
      age: int32
    
    var p: Person
    
    p.name = "foo"
    p.age = 90
    
    console.log(p)
    
    
    Run

in the output js, the str literal is assigned via makeNimstrLit: 
    
    
    var p_129019 = [{
        name: null,
        age: 0
    }];
    p_129019[0].name = nimCopy(null, makeNimstrLit("foo"), NTI47014);
    p_129019[0].age = 90;
    console.log((p_129019[0]));
    
    
    Run

This results in output like: 
    
    
    { name: [ 102, 111, 111 ], age: 90 }
    
    
    Run

instead of: 
    
    
    { name: 'foo', age: 90 }
    
    
    Run

Reply via email to