Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript & Java runtimes concatenate records the wrong way around #118

Closed
jeromesimeon opened this issue Oct 7, 2019 · 1 comment
Closed
Assignees
Labels

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Oct 7, 2019

The specification for record concatenation prioritizes on the right:
Screenshot 2019-10-07 at 11 44 23 AM

But the JavaScript runtime prioritizes on the left:

function concat(r1, r2) {

function concat(r1, r2) {
    var result = { };
    for (var key1 in r1)
	result[key1] = r1[key1];
    for (var key2 in r2)
	if (!(key2 in r1))
	    result[key2] = r2[key2];
    return result;
}

That feels wrong at some level...

@jeromesimeon jeromesimeon changed the title JavaScript runtime concatenates records the wrong way around JavaScript & Java runtimes concatenates records the wrong way around Oct 8, 2019
@jeromesimeon jeromesimeon changed the title JavaScript & Java runtimes concatenates records the wrong way around JavaScript & Java runtimes concatenate records the wrong way around Oct 8, 2019
@jeromesimeon jeromesimeon self-assigned this Oct 8, 2019
@jeromesimeon
Copy link
Member Author

Fixed in PR #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant