Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
be more tight about :D in invocant
  • Loading branch information
moritz committed Jun 22, 2012
1 parent b9a332b commit b68a884
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/Backtrace.pm
Expand Up @@ -8,7 +8,7 @@ my class Backtrace is List {
has Mu $.code;
has Str $.subname;

method subtype {
method subtype(Frame:D:) {
my $s = $!code.^name.lc.split('+', 2)[0];
$s eq 'mu' ?? '' !! $s;
}
Expand All @@ -19,9 +19,9 @@ my class Backtrace is List {
" in {$s}$.subname at {$.file}:$.line\n"
}

method is-hidden { $!code.?is_hidden_from_backtrace }
method is-routine { $!code ~~ Routine }
method is-setting { $!file eq 'src/gen/CORE.setting' }
method is-hidden(Frame:D) { $!code.?is_hidden_from_backtrace }
method is-routine(Frame:D) { $!code ~~ Routine }
method is-setting(Frame:D) { $!file eq 'src/gen/CORE.setting' }
}
proto method new(|$) {*}

Expand Down Expand Up @@ -61,7 +61,7 @@ my class Backtrace is List {
$new;
}

method next-interesting-index(Int $idx is copy = 0) {
method next-interesting-index(Backtrace:D: Int $idx is copy = 0) {
++$idx;
# NOTE: the < $.end looks like an off-by-one error
# but it turns out that a simple perl6 -e 'die "foo"'
Expand All @@ -74,7 +74,7 @@ my class Backtrace is List {
Int;
}

method outer-caller-idx(Int $startidx is copy) {
method outer-caller-idx(Backtrace:D: Int $startidx is copy) {
my %print;
my $start = self.at_pos($startidx).code;
return $startidx.list unless $start;
Expand All @@ -95,7 +95,7 @@ my class Backtrace is List {
return @outers;
}

method nice(:$oneline) {
method nice(Backtrace:D: :$oneline) {
try {
my @frames;
my Int $i = self.next-interesting-index(-1);
Expand Down

0 comments on commit b68a884

Please sign in to comment.