File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ X<|is (container type)>
33
33
The default type can be set with C < is > .
34
34
35
35
class FailHash is Hash {
36
- has Bool $!final = False;
37
- multi method AT-KEY ( ::?CLASS:D: Str:D \key ){
38
- fail X::OutOfRange.new(:what("Hash key"), :got(key), :range(self.keys)) if $!final && !self.EXISTS-KEY(key);
39
- callsame
40
- }
41
-
42
- method finalize () {
43
- $!final = True
44
- }
36
+ has Bool $!final = False;
37
+ multi method AT-KEY ( ::?CLASS:D: Str:D \key ){
38
+ fail X::OutOfRange.new(:what("Hash key"), :got(key), :range(self.keys)) if $!final && !self.EXISTS-KEY(key);
39
+ callsame
40
+ }
41
+
42
+ method finalize () {
43
+ $!final = True
44
+ }
45
45
}
46
46
47
47
my %h is FailHash = oranges => "round", bananas => "bendy";
You can’t perform that action at this time.
0 commit comments