Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created August 14, 2016 18:13
Show Gist options
  • Save MasterDuke17/eb8e42371424528d6ca8d8312ad0692b to your computer and use it in GitHub Desktop.
Save MasterDuke17/eb8e42371424528d6ca8d8312ad0692b to your computer and use it in GitHub Desktop.
RT126264
diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp
index 520ce42..d6ceea6 100644
--- a/src/Perl6/World.nqp
+++ b/src/Perl6/World.nqp
@@ -3939,6 +3939,14 @@ class Perl6::World is HLL::World {
my &inner-evaluator := make_levenshtein_evaluator($name, @candidates);
my %seen;
%seen{$name} := 1;
+
+ # RT 126264
+ # Since there's no programmatic way to get a list of all phasers applicable to the current scope,
+ # just check against this list of all of them that aren't already the names of routines
+ for <&BEGIN &CHECK &INIT &ENTER &LEAVE &KEEP &UNDO &PRE &POST &CATCH &CONTROL &COMPOSE &DOC> -> $phaser {
+ &inner-evaluator($phaser, %seen);
+ }
+
sub evaluate($name, $value, $has_value, $hash) {
return 1 unless nqp::eqat($name, '&', 0);
return 1 if nqp::existskey(%seen, $name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment