<commit_before>my class Pair does Associative {
    has $.key is default(Nil);
    has $.value is rw is default(Nil);

    proto method new(|) { * }
    # This candidate is needed because it currently JITS better
    multi method new(Pair: Cool:D \key, Mu \value) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',nqp::decont(key));
        nqp::bindattr(p,Pair,'$!value',value);
        p
    }
    multi method new(Pair: Mu \key, Mu \value) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',nqp::decont(key));
        nqp::bindattr(p,Pair,'$!value',value);
        p
    }
    multi method new(Pair: Mu :$key!, Mu :$value!) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',$key);
        nqp::bindattr(p,Pair,'$!value',$value);
        p
    }

    multi method WHICH(Pair:D:) {
        nqp::iscont($!value)
          ?? nextsame()
          !! "Pair|" ~ $!key.WHICH ~ "|" ~ $!value.WHICH
    }

    multi method ACCEPTS(Pair:D: %h) {<commit_msg>Make Pair.WHICH return an ObjAt always<commit_after>my class Pair does Associative {
    has $.key is default(Nil);
    has $.value is rw is default(Nil);

    proto method new(|) { * }
    # This candidate is needed because it currently JITS better
    multi method new(Pair: Cool:D \key, Mu \value) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',nqp::decont(key));
        nqp::bindattr(p,Pair,'$!value',value);
        p
    }
    multi method new(Pair: Mu \key, Mu \value) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',nqp::decont(key));
        nqp::bindattr(p,Pair,'$!value',value);
        p
    }
    multi method new(Pair: Mu :$key!, Mu :$value!) {
        my \p := nqp::p6bindattrinvres(
          nqp::create(self),Pair,'$!key',$key);
        nqp::bindattr(p,Pair,'$!value',$value);
        p
    }

    multi method WHICH(Pair:D:) {
        nqp::iscont($!value)
          ?? nextsame()
          !! nqp::box_s("Pair|" ~ $!key.WHICH ~ "|" ~ $!value.WHICH,ObjAt)
    }

    multi method ACCEPTS(Pair:D: %h) {
{'fraction_non_alphanumeric': 0.182328190743338, 'fraction_numerical': 0.002805049088359046, 'mean_word_length': 2.5726210350584306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1826230', 'n_tokens_mistral': 789, 'n_tokens_neox': 770, 'n_words': 161}