Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[common] If no parent class is specified, use Mu (for now and in NQP,…

… that is). Fix a silly and...we have a working if incomplete inherited new method.
  • Loading branch information...
commit b18a4f44ee8ba4304e9ad0a9856c16c781a6c86a 1 parent dd032c5
@jnthn authored
Showing with 7 additions and 1 deletion.
  1. +6 −0 common/NQP/NQPSetting.pm
  2. +1 −1  common/NQP/P6Objects.pm
View
6 common/NQP/NQPSetting.pm
@@ -434,6 +434,12 @@ my knowhow NQPClassHOW {
method compose($obj) {
# XXX TODO: Compose roles (must come before we make MRO,
# and may provide multi candidates.)
+
+ # If we have no parents and we're not called Mu (XXX that's a
+ # tad fragile, I guess...) then add Mu as our parent.
+ if +@!parents == 0 && $!name ne 'Mu' {
+ self.add_parent($obj, Mu)
+ }
# Some things we only do if we weren't already composed once, like
# building the MRO.
View
2  common/NQP/P6Objects.pm
@@ -4,6 +4,6 @@ class Mu {
}
method CREATE() {
- repr::instance_of(self)
+ nqp::instance_of(self)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.