{"atom":"regression/qualified-dispatch-and-nil-smartmatch","family":"regression","slug":"qualified-dispatch-and-nil-smartmatch","header":{"atom":"regression/qualified-dispatch-and-nil-smartmatch","kind":"whole-program — a minimal repro, not yet reduced to an atom","source":"curated"},"axes":null,"cols":null,"engines":["rakudo-2026.07","rakupp-3.14.0"],"kinds":["ref","pp"],"defFrom":"rakupp:t/regression/qualified-dispatch-and-nil-smartmatch.raku","counts":{"a":1,"f":0,"d":0,"c":0,"r":0,"n":0},"files":["atoms/regression/qualified-dispatch-and-nil-smartmatch.grid"],"records":[["0001","","# Regression: two general fixes surfaced implementing `zef install` under rakupp.\n#   1. `$obj.Class::method` dispatches to Class's method, reaching PAST the\n#      invocant's own override. The qualifier was stripped, so `self.Parent::meth`\n#      from within an override called the override again → infinite recursion.\n#      (zef: `self.Zef::Distribution::meta` inside Local.meta.)\n#   2. `$x ~~ Nil` is true only for Nil ITSELF — a defined-but-empty hash/list/str\n#      does NOT match Nil (it used to, so `when <falsy-expr>` fired wrongly on a\n#      hash topic). (zef: the license-filter `when .<blacklist>.?chars && …`.)\n# Contract: exit 0 + last line PASS.\nmy @fail;\n\n# 1. qualified parent-method dispatch (class inheritance)\nclass P { method m { 'parent' } }\nclass C is P { method m { self.P::m ~ '+child' } }\n@fail.push('class-qual') unless C.new.m eq 'parent+child';\n# with attribute access in the parent method\nclass P2 { method describe { self.x } }\nclass C2 is P2 { has $.x = 42; method describe { 'C2:' ~ self.P2::describe } }\n@fail.push('class-qual-attr') unless C2.new.describe eq 'C2:42';\n# an unknown/builtin qualifier falls through to ordinary dispatch\n@fail.push('builtin-qual') unless (1, 2, 3).Any::elems == 3;\n\n# 2. ~~ Nil is Nil-only\n@fail.push('emptyhash-nil') if (my %h) ~~ Nil;\n@fail.push('emptylist-nil') if () ~~ Nil;\n@fail.push('emptystr-nil')  if '' ~~ Nil;\n@fail.push('nil-nil')       unless Nil ~~ Nil;\n@fail.push('int-nil')       if 5 ~~ Nil;\n# the case that bit zef: `when <falsy-expr>` must not fire on a hash topic\nmy $r = do given %h {\n    when .<blacklist>.?chars && any(|.<blacklist>) ~~ any('*') { 'fired' }\n};\n# a `given` whose `when` never matches yields False — which IS defined, so the\n# check is that the block did not FIRE, not that $r is undefined\n@fail.push(\"when-falsy-on-hash ({$r.raku})\") unless $r === False;\n\nif @fail { note \"FAILED: @fail[]\"; say 'FAIL' } else { say 'PASS' }","output PASS","a",["PASS","PASS"],0,[["budget","20s"]]]]}