Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
stylistic exception updates
no functional changes
  • Loading branch information
moritz committed May 27, 2012
1 parent 3003279 commit a4c09d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/CallFrame.pm
Expand Up @@ -48,7 +48,7 @@ my class CallFrame {
}

method callframe(Int $level = 0) {
die X::NYI.new(feature => 'Callframe.callframe');
X::NYI.new(feature => 'Callframe.callframe').throw;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/Hash.pm
Expand Up @@ -46,7 +46,7 @@ my class Hash {
}
elsif $items { self.STORE_AT_KEY($x, $items.shift) }
else {
die(X::Hash::Store::OddNumber.new())
X::Hash::Store::OddNumber.new.throw
}
}
self
Expand Down
7 changes: 3 additions & 4 deletions src/core/operators.pm
Expand Up @@ -21,19 +21,18 @@ multi infix:<does>(Mu:D \$obj, Mu:U \$rolish, :$value! is parcel) is rw {
$rolish.HOW.archetypes.composalizable() ?? $rolish.HOW.composalize($rolish) !!
die("Cannot mix in a non-composable type");
my @attrs = $role.^attributes().grep: { .has_accessor };
die(X::Role::Initialization.new())
unless @attrs == 1;
X::Role::Initialization.new().throw unless @attrs == 1;
$obj.HOW.mixin($obj, $role).BUILD_LEAST_DERIVED({ @attrs[0].Str.substr(2) => $value });
}
multi infix:<does>(Mu:U \$obj, Mu:U \$role) is rw {
die(X::Does::TypeObject.new())
X::Does::TypeObject.new().throw
}
multi infix:<does>(Mu:D \$obj, @roles) is rw {
# XXX Mutability check.
$obj.HOW.mixin($obj, |@roles).BUILD_LEAST_DERIVED({});
}
multi infix:<does>(Mu:U \$obj, @roles) is rw {
die(X::Does::TypeObject.new())
X::Does::TypeObject.new().throw
}

proto infix:<but>(|$) { * }
Expand Down

0 comments on commit a4c09d1

Please sign in to comment.