X Tutup
Skip to content

Update valueToString for undefined values and fix failing tests#733

Closed
TheLartians wants to merge 5 commits intoTypeScriptToLua:masterfrom
TheLartians:fix-valuesToString
Closed

Update valueToString for undefined values and fix failing tests#733
TheLartians wants to merge 5 commits intoTypeScriptToLua:masterfrom
TheLartians:fix-valuesToString

Conversation

@TheLartians
Copy link
Contributor

No description provided.

@TheLartians TheLartians changed the title Update valueToString for undefined values and fix failing tests WIP: Update valueToString for undefined values and fix failing tests Oct 5, 2019
@TheLartians TheLartians marked this pull request as ready for review October 5, 2019 18:43
@TheLartians TheLartians changed the title WIP: Update valueToString for undefined values and fix failing tests Update valueToString for undefined values and fix failing tests Oct 5, 2019
const array = ${util.valueToString(array)};
array.splice(${util.valuesToString([start, deleteCount, ...newElements])});
array.splice(${util.valuesToString(
deleteCount ? [start, deleteCount, ...newElements] : [start, ...newElements]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like our implementation is actually incorrect:

[1, 2, 3].splice(1) // => [2, 3]
[1, 2, 3].splice(1, 0) // => []
[1, 2, 3].splice(1, undefined) // => js [], lua [2, 3]

TheLartians and others added 2 commits October 9, 2019 11:52
Co-Authored-By: ark120202 <ark120202@gmail.com>
@Perryvw
Copy link
Member

Perryvw commented Oct 9, 2019

Solved by #734

@Perryvw Perryvw closed this Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup