Skip to content

Commit ef77cff

Browse files
committed
Always re-compute MRO upon composition.
1 parent ded87cc commit ef77cff

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/how/NQPClassHOW.pm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,8 @@ knowhow NQPClassHOW {
222222
self.add_parent($obj, $!default_parent)
223223
}
224224

225-
# Some things we only do if we weren't already composed once, like building
226-
# the MRO.
227-
unless $!composed {
228-
@!mro := compute_c3_mro($obj);
229-
$!composed := 1;
230-
}
225+
# Compute the MRO.
226+
@!mro := compute_c3_mro($obj);
231227

232228
# Incorporate any new multi candidates (needs MRO built).
233229
self.incorporate_multi_candidates($obj);
@@ -246,6 +242,9 @@ knowhow NQPClassHOW {
246242

247243
# Create BUILDPLAN.
248244
self.create_BUILDPLAN($obj);
245+
246+
# Mark as composed.
247+
$!composed := 1;
249248

250249
$obj
251250
}

0 commit comments

Comments
 (0)