Skip to content

Commit

Permalink
Remove check for nullness of descriptor
Browse files Browse the repository at this point in the history
Apparently, Arrays nowadays always have a descriptor
  • Loading branch information
lizmat committed Jan 5, 2022
1 parent a8498e8 commit b2f0a9d
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/core.c/Array.pm6
Expand Up @@ -1270,22 +1270,15 @@ my class Array { # declared in BOOTSTRAP
}

# introspection
method name() {
nqp::isnull($!descriptor) ?? Nil !! $!descriptor.name
}
method name() { $!descriptor.name }

proto method of() {*}
multi method of(Array:U:) { Mu }
multi method of(Array:D:) {
nqp::isnull($!descriptor) ?? Mu !! $!descriptor.of
}
multi method of(Array:D:) { $!descriptor.of }

method default() { $!descriptor.default }
method dynamic() { $!descriptor.dynamic.Bool }

method default() {
nqp::isnull($!descriptor) ?? Any !! $!descriptor.default
}
method dynamic() {
nqp::isnull($!descriptor) ?? False !! so $!descriptor.dynamic
}
multi method raku(Array:D \SELF: --> Str:D) {
SELF.rakuseen('Array', {
'$' x nqp::iscont(SELF) # self is always deconted
Expand Down

0 comments on commit b2f0a9d

Please sign in to comment.