[Implement] Buffer.compare by jtenner · Pull Request #7 · AssemblyScript/node
Navigation Menu
{{ message }}
AssemblyScript / node Public
- Notifications You must be signed in to change notification settings
- Fork 10
Conversation
Copy link Copy Markdown
Contributor
Notes:
- this function works really nicely with
memory.compare() Currently, the compiler doesn't like usingstaticfunctions as function parameters (Will open an issue in the AssemblyScript repo)
ERROR AS218: Cannot access method 'compare' without calling it as it requires 'this' to be set.
actual.sort(Buffer.compare);
~~~~~~~~~~~~~~
in tests/buffer.spec.ts(60,16)
Edit:
Switching tostatic readonlyfunction expression causes this to compile
jtenner
requested a review
from dcodeIO
jtenner
self-assigned this
jtenner
force-pushed
the
compare
branch
from
d9abae1 to
a601a60
Compare
jtenner
mentioned this pull request
jtenner
force-pushed
the
compare
branch
from
a601a60 to
09af2a2
Compare
Copy link Copy Markdown
Contributor Author
jtenner
commented
Jul 23, 2019
jtenner commented
Jul 23, 2019With the static function fix, everything seems to look nice. Thoughts? @dcodeIO
Copy link Copy Markdown
Contributor Author
jtenner
commented
Aug 1, 2019
jtenner commented
Aug 1, 2019TODO: Implement Buffer#compare.
TODO: Return 1, 0, or -1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment