Skip to content

test: reproduce bad inference behavior of @mel.as#1416

Merged
anmonteiro merged 1 commit intomainfrom
anmonteiro/repro-bad-inference
Apr 6, 2025
Merged

test: reproduce bad inference behavior of @mel.as#1416
anmonteiro merged 1 commit intomainfrom
anmonteiro/repro-bad-inference

Conversation

@anmonteiro
Copy link
Member

@anmonteiro anmonteiro commented Apr 6, 2025

we made a mistake when inferring @mel.as in external polyvariants in #722.

@mel.string actually meant @mel.spread, which we'll be making explicit in #1404.

inferring @mel.as should not splice in the arguments as shown by the reproduction in the test case added in this PR.

'use strict';


foo("bar", 2);
Copy link
Member Author

@anmonteiro anmonteiro Apr 6, 2025

Choose a reason for hiding this comment

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

@mel.as here should just have changed the argument to "bar":

foo({
  NAME: "foo",
  VAL: 2
});

@anmonteiro anmonteiro merged commit c4d7aef into main Apr 6, 2025
7 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/repro-bad-inference branch April 6, 2025 23:19
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.

1 participant