From 5585454f54a3a5303c5d26a7b959395292af09b4 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Tue, 27 Feb 2024 13:34:05 +0100 Subject: [PATCH] (is_)array_type don't need any positional argument --- src/Perl6/Metamodel/ParametricRoleHOW.nqp | 4 ++-- src/Perl6/Metamodel/REPRComposeProtocol.nqp | 4 ++-- src/Perl6/Metamodel/RoleToClassApplier.nqp | 6 +++--- src/Perl6/Metamodel/RoleToRoleApplier.nqp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Perl6/Metamodel/ParametricRoleHOW.nqp b/src/Perl6/Metamodel/ParametricRoleHOW.nqp index 2f5529c2e79..db988824ee5 100644 --- a/src/Perl6/Metamodel/ParametricRoleHOW.nqp +++ b/src/Perl6/Metamodel/ParametricRoleHOW.nqp @@ -268,8 +268,8 @@ class Perl6::Metamodel::ParametricRoleHOW # Resolve any array type being passed along (only really used in the # punning case, since roles are the way we get generic types). - if self.is_array_type($target) { - my $at := self.array_type($target); + if self.is_array_type { + my $at := self.array_type; if $at.HOW.archetypes($at).generic { $at := $at.HOW.instantiate_generic($at, $type_env); } diff --git a/src/Perl6/Metamodel/REPRComposeProtocol.nqp b/src/Perl6/Metamodel/REPRComposeProtocol.nqp index c5a205ae2e8..4c922b807a5 100644 --- a/src/Perl6/Metamodel/REPRComposeProtocol.nqp +++ b/src/Perl6/Metamodel/REPRComposeProtocol.nqp @@ -4,12 +4,12 @@ role Perl6::Metamodel::REPRComposeProtocol { method compose_repr($target) { unless $!composed_repr { # Is it an array type? - if nqp::can(self, 'is_array_type') && self.is_array_type($target) { + if nqp::can(self, 'is_array_type') && self.is_array_type { if self.attributes($target) { nqp::die("Cannot have attributes on an array representation"); } nqp::composetype(nqp::decont($target), nqp::hash('array', - nqp::hash('type', nqp::decont(self.array_type($target))))); + nqp::hash('type', nqp::decont(self.array_type)))); } # Otherwise, presume it's an attribute type. diff --git a/src/Perl6/Metamodel/RoleToClassApplier.nqp b/src/Perl6/Metamodel/RoleToClassApplier.nqp index a09abbfc709..adf325eeaba 100644 --- a/src/Perl6/Metamodel/RoleToClassApplier.nqp +++ b/src/Perl6/Metamodel/RoleToClassApplier.nqp @@ -230,10 +230,10 @@ my class RoleToClassApplier { } # Copy any array_type. - if nqp::can($!target.HOW, 'is_array_type') && !$!target.HOW.is_array_type($!target) { + if nqp::can($!target.HOW, 'is_array_type') && !$!target.HOW.is_array_type { if nqp::can($!to_compose_meta, 'is_array_type') { - if $!to_compose_meta.is_array_type($!to_compose) { - $!target.HOW.set_array_type($!target, $!to_compose_meta.array_type($!to_compose)); + if $!to_compose_meta.is_array_type { + $!target.HOW.set_array_type($!target, $!to_compose_meta.array_type); } } } diff --git a/src/Perl6/Metamodel/RoleToRoleApplier.nqp b/src/Perl6/Metamodel/RoleToRoleApplier.nqp index 217138c7f90..dac65cd9a41 100644 --- a/src/Perl6/Metamodel/RoleToRoleApplier.nqp +++ b/src/Perl6/Metamodel/RoleToRoleApplier.nqp @@ -291,10 +291,10 @@ my class RoleToRoleApplier { } } - if nqp::can($target.HOW, 'is_array_type') && !$target.HOW.is_array_type($target) { + if nqp::can($target.HOW, 'is_array_type') && !$target.HOW.is_array_type { if nqp::can($how, 'is_array_type') { - if $how.is_array_type($r) { - $target.HOW.set_array_type($target, $how.array_type($r)); + if $how.is_array_type { + $target.HOW.set_array_type($target, $how.array_type); } } }