Skip to content
Permalink
Browse files

Make Type.name a proper attribute

  • Loading branch information...
lizmat committed May 24, 2019
1 parent 9e8da74 commit ef7f04083d7dc43e51a4875b080b9727d04304c7
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/MoarVM/Profiler.pm6
@@ -164,15 +164,15 @@ class MoarVM::Profiler::Type does OnHash[<
managed_size
repr
type
name
has_unmanaged_data
>] {
has Int $.id;
has Str $.name;
has %.threads; # set by MoarVM::Profiler.new

method new( ($id,%hash) ) { self.bless(:$id, :%hash) }
method TWEAK() {
%!hash.BIND-KEY('name',(try .^name) || "(" ~ nqp::objectid($_) ~ ")")
$!name := (try .^name) || "(" ~ nqp::objectid($_) ~ ")")
given %!hash<type>;
}

0 comments on commit ef7f040

Please sign in to comment.
You can’t perform that action at this time.