Skip to content

Commit

Permalink
Fix some Nil LTA warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
skids committed Jan 12, 2016
1 parent 0c4db8d commit 991f9a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/Nil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ my class Nil is Cool { # declared in BOOTSTRAP
# method ACCEPTS(*@) { Nil } # XXX spec says Nil, but makes spectest hang

method BIND-POS(*@) { die "Attempted to BIND-POS to {self.gist}." }
method BIND-KEY(*@) { fail X::Bind.new(target => '{self.gist}') }
method BIND-KEY(*@) { fail X::Bind.new(target => self.gist) }
method ASSIGN-POS(*@) { die "Attempted to ASSIGN-POS to {self.gist}." }
method ASSIGN-KEY(*@) { die "Attempted to ASSIGN-KEY to {self.gist}." }
method STORE(*@) { X::Assignment::RO.new(:typename<Nil>).throw }
Expand All @@ -22,6 +22,10 @@ my class Nil is Cool { # declared in BOOTSTRAP
method prepend(*@) is nodal { die "Attempted to prepend to {self.gist}." }
method FALLBACK(*@) { Nil }

# These suggest using Nil.new if they fall through, which is LTA
method ords { self.Str.ords }
method chrs { self.Str.chrs }

method iterator() { self.list.iterator }
}

Expand Down

0 comments on commit 991f9a2

Please sign in to comment.