Permalink
Browse files

Make Cool mutable, as per S02:1893

This just removes the error, this does not fix the subclasses not seeing any
augmentation.
  • Loading branch information...
1 parent ec29c0f commit 0026bfb277ad2fd534649c839ab9c10fc7e70e18 @lizmat lizmat committed Oct 27, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/Perl6/Grammar.nqp
View
@@ -1985,17 +1985,16 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
else {
# Augment. Ensure we can.
- my @name := $longname ??
- $longname.type_name_parts('package name', :decl(1)) !!
- [];
- unless $*MONKEY_TYPING {
+ if !$*MONKEY_TYPING && $longname.text ne 'Cool' {
$/.CURSOR.typed_panic('X::Syntax::Augment::WithoutMonkeyTyping');
}
- unless @name {
+ elsif !$longname {
$*W.throw($/, 'X::Anon::Augment', package-kind => $*PKGDECL);
}
-
+
# Locate type.
+ my @name :=
+ $longname.type_name_parts('package name', :decl(1));
my $found;
try { $*PACKAGE := $*W.find_symbol(@name); $found := 1 }
unless $found {

0 comments on commit 0026bfb

Please sign in to comment.