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

Provide better feedback for ambiguous adverb usage #823

Merged
merged 1 commit into from
May 22, 2024
Merged

Provide better feedback for ambiguous adverb usage #823

merged 1 commit into from
May 22, 2024

Conversation

ab5tract
Copy link
Contributor

This fixes an LTA situation:

> my %h = :1k; say 1 ~ %h<k>:exists ~ 1
===SORRY!===
MVMArray: Can't pop from an empty array

Now we throw an X::Syntax::AmbiguousAdverb exception:

> my %h = :1k; say 1 ~ %h<k>:exists ~ 1
===SORRY!=== Error while compiling -e
Cannot determine the destination for named argument: :exists
Try placing parentheses around the desired callsite to disambiguate.

This addresses R#1378.

src/HLL/Grammar.nqp Outdated Show resolved Hide resolved
src/HLL/Grammar.nqp Outdated Show resolved Hide resolved
@ab5tract ab5tract force-pushed the r1378 branch 2 times, most recently from 25362cf to 3e1c475 Compare May 22, 2024 19:25
This fixes an LTA situation:

    > my %h = :1k; say 1 ~ %h<k>:exists ~ 1
    ===SORRY!===
    MVMArray: Can't pop from an empty array

Now we throw an exception:

    > my %h = :1k; say 1 ~ %h<k>:exists ~ 1
    ===SORRY!=== Error while compiling -e
    Cannot determine the destination for named argument: :exists
    Try placing parentheses around the desired callsite to disambiguate.

This addresses R#1378.
@lizmat lizmat merged commit fa489fe into main May 22, 2024
3 of 10 checks passed
@lizmat lizmat deleted the r1378 branch May 22, 2024 19:50
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.

None yet

2 participants