Skip to content

Commit

Permalink
Remove *.exists
Browse files Browse the repository at this point in the history
It has been deprecated for > 1 year
  • Loading branch information
lizmat committed Oct 10, 2014
1 parent d083173 commit 233cb0b
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 34 deletions.
4 changes: 0 additions & 4 deletions src/core/Any.pm
Expand Up @@ -14,10 +14,6 @@ my class Any { # declared in BOOTSTRAP

# primitives
method infinite() { Nil }
method exists (Any:U: $key) { # is DEPRECATED doesn't work in settings
DEPRECATED("the :exists adverb");
False;
}

method exists_key($key) { False }
proto method exists_pos(|) { * }
Expand Down
4 changes: 0 additions & 4 deletions src/core/Baggy.pm
Expand Up @@ -9,10 +9,6 @@ my role Baggy does QuantHash {
method kxxv { %!elems.values.map( {.key xx .value} ) }
method elems(--> Int) { %!elems.elems }
method total(--> Int) { [+] self.values }
method exists ($k --> Bool) { # is DEPRECATED doesn't work in settings
DEPRECATED('the :exists adverb with postcircumfix:<{ }>');
self.exists_key($k);
}
method exists_key($k --> Bool) {
%!elems.exists_key($k.WHICH);
}
Expand Down
4 changes: 0 additions & 4 deletions src/core/Capture.pm
Expand Up @@ -46,10 +46,6 @@ my class Capture { # declared in BOOTSTRAP
$enum;
}

method exists (Capture:D: $key ) { # is DEPRECATED doesn't work in settings
DEPRECATED("the :exists adverb");
self.exists_key($key);
}
method exists_key(Capture:D: $key ) {
nqp::p6bool(nqp::existskey($!hash, nqp::unbox_s($key.Str)));
}
Expand Down
10 changes: 0 additions & 10 deletions src/core/EnumMap.pm
Expand Up @@ -27,16 +27,6 @@ my class EnumMap does Associative { # declared in BOOTSTRAP
so self.keys.any.match($topic);
}

proto method exists(|) {*}
multi method exists (EnumMap:U:) { # is DEPRECATED doesn't work in settings
DEPRECATED('the :exists adverb with postcircumfix:<{ }>');
self.exists_key;
}
multi method exists (EnumMap:D: \key) { # is DEPRECATED doesn't work in settings
DEPRECATED('the :exists adverb with postcircumfix:<{ }>');
self.exists_key(key);
}

proto method exists_key(|) {*}
multi method exists_key(EnumMap:U:) { False }
multi method exists_key(EnumMap:D: Str:D \key) {
Expand Down
4 changes: 0 additions & 4 deletions src/core/Hash.pm
Expand Up @@ -401,10 +401,6 @@ my class Hash { # declared in BOOTSTRAP
nqp::unbox_s($key_which),
bindval)
}
method exists (TKey \key) { # is DEPRECATED doesn't work in settings
DEPRECATED('the :exists adverb with postcircumfix:<{ }>');
self.exists_key(key);
}
method exists_key(TKey \key) {
nqp::defined($!keys)
?? nqp::p6bool(nqp::existskey($!keys, nqp::unbox_s(key.WHICH)))
Expand Down
4 changes: 0 additions & 4 deletions src/core/List.pm
Expand Up @@ -106,10 +106,6 @@ my class List does Positional { # declared in BOOTSTRAP
$!nextiter.defined ?? Inf !! $n
}

method exists (\pos) { # is DEPRECATED doesn't work in settings
DEPRECATED("the :exists adverb with postcircumfix:<[ ]>");
self.exists_pos(pos);
}
method exists_pos(\pos) {
return False if !self.DEFINITE || pos < 0;
self.gimme(pos + 1);
Expand Down
4 changes: 0 additions & 4 deletions src/core/Setty.pm
Expand Up @@ -10,10 +10,6 @@ my role Setty does QuantHash {
method total(--> Int) { %!elems.elems }
method minpairs(--> List) { self.pairs }
method maxpairs(--> List) { self.pairs }
method exists ($k --> Bool) { # is DEPRECATED doesn't work in settings
DEPRECATED('the :exists adverb with postcircumfix:<{ }>');
self.exists_key($k);
}
method exists_key($k --> Bool) {
so ( %!elems && nqp::existskey(%!elems, nqp::unbox_s($k.WHICH)) );
}
Expand Down

0 comments on commit 233cb0b

Please sign in to comment.