Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make %h<a><b> := "foo" work; alas, %h<a><b> := my $b doesn't yet

  • Loading branch information...
commit 8a6a949ec217dd435377c615c6c7839c6fd4d8a7 1 parent 90cfaa0
lizmat authored

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. 11  src/core/Any.pm
11  src/core/Any.pm
@@ -716,7 +716,7 @@ my class Any { # declared in BOOTSTRAP
716 716
     # internals
717 717
     proto method at_key(|) { * }
718 718
     multi method at_key(Any:D: $key) {
719  
-        fail "postcircumfix:<\{ \}> not defined for type {self.WHAT.perl}";
  719
+        fail "postcircumfix:<\{ \}> binding not defined for type {self.WHAT.perl}";
720 720
     }
721 721
     multi method at_key(Any:U \SELF: $key) is rw {
722 722
         nqp::bindattr(my $v, Scalar, '$!whence',
@@ -724,6 +724,15 @@ my class Any { # declared in BOOTSTRAP
724 724
                  SELF.bind_key($key, $v) });
725 725
         $v
726 726
     }
  727
+    proto method bind_key(|) { * }
  728
+    multi method bind_key(Any:D: $key, $BIND ) {
  729
+        fail "postcircumfix:<\{ \}> not defined for type {self.WHAT.perl}";
  730
+    }
  731
+    multi method bind_key(Any:U \SELF: $key, $BIND ) is rw {
  732
+        &infix:<=>(SELF, Hash.new);
  733
+        SELF.bind_key($key, $BIND);
  734
+        $BIND
  735
+    }
727 736
 
728 737
     method FLATTENABLE_LIST() { 
729 738
         my $list := self.list;

0 notes on commit 8a6a949

Please sign in to comment.
Something went wrong with that request. Please try again.