-
-
Save Altai-man/f2e7816a71b32320017fe5d5e72f283c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ASNType { | |
has $.type is rw; # NO BUG IF REMOVE `is rw` | |
} | |
my $new-type = Metamodel::ClassHOW.new_type(name => 'LDAPMessage'); | |
my $attribute-type = ASNType.new(type => Int); | |
my $attr = Attribute.new(name => '$!protocol-op', type => $attribute-type.type, package => $new-type, :has_accessor); # NO BUG IF REMOVE `has_accessor` | |
$new-type.^add_attribute($attr); | |
$new-type.^compose; | |
say $new-type.new; # expected -> type, real: | |
# Invocant of method 'raku' must be an object instance of type 'Mu', not | |
# a type object of type 'ProtocolOp'. Did you forget a '.new'? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment