You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, ts2c include all properties in the C definition (not the actual problem) and take them all into account when the object is used. This change the program semantic.
The C program output for this case is
{ key: "hello", newKey: "(null)" }
but should be
{ key: "hello" }
since newKey do not exists when console.log is called. Just for comparison, this would not happen if the internal representation for objects were actually a dictionary (possibly with some performance penalties).
The text was updated successfully, but these errors were encountered:
Using the
README.md
example as starting point:If we add the
newKey
property after theconsole.log
, it should not appear in the output.However,
ts2c
include all properties in the C definition (not the actual problem) and take them all into account when the object is used. This change the program semantic.The C program output for this case is
but should be
since
newKey
do not exists whenconsole.log
is called. Just for comparison, this would not happen if the internal representation for objects were actually a dictionary (possibly with some performance penalties).The text was updated successfully, but these errors were encountered: