Skip to content

Commit

Permalink
Revert "Make 'my %h is Set(|Hash) = ...;' DWIM"
Browse files Browse the repository at this point in the history
This reverts commit 1949a2b.
  • Loading branch information
lizmat committed Oct 30, 2017
1 parent 948af00 commit 6ac2b15
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
15 changes: 0 additions & 15 deletions src/core/Set.pm
Expand Up @@ -11,21 +11,6 @@ my class Set does Setty {
set()
)
}
method STORE(*@pairs --> Set:D) {
nqp::if(
(my $iterator := @pairs.iterator).is-lazy,
Failure.new(X::Cannot::Lazy.new(:action<initialize>,:what(self.^name))),
nqp::if(
$!elems || nqp::eqaddr(self,set()),
X::Immutable.new( method => 'STORE', typename => self.^name ).throw,
self.SET-SELF(
Rakudo::QuantHash.ADD-PAIRS-TO-SET(
nqp::create(Rakudo::Internals::IterationSet), $iterator
)
)
)
)
}
multi method new(Set:_:) {
nqp::if(
nqp::eqaddr(self.WHAT,Set),
Expand Down
15 changes: 0 additions & 15 deletions src/core/SetHash.pm
Expand Up @@ -10,21 +10,6 @@ my class SetHash does Setty {
)
}

method STORE(*@pairs --> SetHash:D) {
nqp::if(
(my $iterator := @pairs.iterator).is-lazy,
Failure.new(X::Cannot::Lazy.new(:action<initialize>,:what(self.^name))),
nqp::stmts(
nqp::bindattr(self,::?CLASS,'$!elems',
Rakudo::QuantHash.ADD-PAIRS-TO-SET(
nqp::create(Rakudo::Internals::IterationSet), $iterator
)
),
self
)
)
}

#--- selector methods

multi method grab(SetHash:D:) {
Expand Down

0 comments on commit 6ac2b15

Please sign in to comment.