<commit_before>T infer<T>(Co<T> co) { return nothing; }

interface G {} interface H {}

interface Co<out T> {
    formal shared T get();
}

class SuperCo() satisfies Co<Object> {
    default shared actual Object get() { return 1; }
}
class SubCo() extends SuperCo() satisfies Co<String> {
    default shared actual String get() { return ""; }
    void m() {
        @type:"Object" super.get();
    }
} 
@error class SubCoBroken() extends SuperCo() satisfies Co<String> {}
void testSubCo() {
    value inst = SubCo();
    @type:"String" inst.get();
    Co<String> cog = inst;
    Co<Object> coo = inst;
    @type:"String" infer(inst);
}

class SuperCoOk() satisfies Co<String> {
    default shared actual String get() { return ""; }
}
class SubCoOk() extends SuperCoOk() satisfies Co<Object> {
} 
void testSubCoOk() {
    value inst = SubCoOk();
    @type:"String" inst.get();
    Co<String> cog = inst;
    Co<Object> coo = inst;
    @type:"String" infer(inst);
}


class SuperCoGood() satisfies Co<G> {
    default shared actual G get() { return nothing; }
}
class SubCoGood() extends SuperCoGood() satisfies Co<H> {
    default shared actual H&G get() { return nothing; }
    void m() {
        @type:"G" super.get();
    }
}
void testSubCoGood() {
    value inst = SubCoGood();
    @type:"H&G" inst.get();
    Co<G> cog = inst;
    Co<H> coh = inst;
    Co<Object> coo = inst;
    Co<G&H> cogh = inst;
    @type:"G&H" infer(inst);
}

interface InterCoG satisfies Co<G> {
    default shared actual G get() { return nothing; }
}
interface InterCoH satisfies Co<H> {}
interface InterCo satisfies Co<Object> {}

@error class SatCoBroken() satisfies InterCoG&InterCoH {}

class SatCoOK() satisfies InterCo&InterCoG&InterCoH {<commit_msg>extra tests<commit_after>T infer<T>(Co<T> co) { return nothing; }

interface G {} interface H {}

interface Co<out T> {
    formal shared T get();
    shared class C<out S>(S* s) {
        shared T get() => nothing;
    }
}

class SuperCo() satisfies Co<Object> {
    default shared actual Object get() { return 1; }
}
class SubCo() extends SuperCo() satisfies Co<String> {
    default shared actual String get() { return ""; }
    void m() {
        @type:"Object" super.get();
    }
} 
@error class SubCoBroken() extends SuperCo() satisfies Co<String> {}
void testSubCo() {
    value inst = SubCo();
    @type:"String" inst.get();
    Co<String> cog = inst;
    Co<Object> coo = inst;
    @type:"String" infer(inst);
}

class SuperCoOk() satisfies Co<String> {
    default shared actual String get() { return ""; }
}
class SubCoOk() extends SuperCoOk() satisfies Co<Object> {
} 
void testSubCoOk() {
    value inst = SubCoOk();
    @type:"String" inst.get();
    Co<String> cog = inst;
    Co<Object> coo = inst;
    @type:"String" infer(inst);
}


class SuperCoGood() satisfies Co<G> {
    default shared actual G get() { return nothing; }
}
class SubCoGood() extends SuperCoGood() satisfies Co<H> {
    default shared actual H&G get() { return nothing; }
    void m() {
        @type:"G" super.get();
    }
}
void testSubCoGood() {
    value inst = SubCoGood();
    
    @type:"H&G" inst.get();
    Co<G> cog = inst;
    Co<H> coh = inst;
    Co<Object> coo = inst;
    Co<G&H> cogh = inst;
    @type:"G&H" infer(inst);
    
    @type:"G&H" inst.C("").get();
    Co<G>.C<String|Float> cogc = inst.C("", 0.0);
    Co<H>.C<String|Float> cohc = inst.C("", 0.0);
    Co<Object>.C<String|Float> cooc = inst.C("", 0.0);
    Co<G&H>.C<String|Float> coghc = inst.C("", 0.0);
}

interface InterCoG satisfies Co<G> {
    default shared actual G get() { return nothing; }
}
interface InterCoH satisfies Co<H> {}
interface InterCo satisfies Co<Object> {}

@error class SatCoBroken() satisfies InterCoG&InterCoH {}

class SatCoOK() satisfies InterCo&InterCoG&InterCoH {
{'fraction_non_alphanumeric': 0.15994729907773386, 'fraction_numerical': 0.002635046113306983, 'mean_word_length': 3.4764150943396226, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 55, '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': '2396975', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1297, 'n_words': 374}