Raku / nqp

NQP
Other
336 stars 131 forks source link

Provide better feedback for ambiguous adverb usage #823

Closed ab5tract closed 3 months ago

ab5tract commented 3 months ago

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.