<commit_before>class Consumer<in X>() {
    shared void consume(X x) {}
}
class Capturing0<out T>(T t, Capturing1<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() {}
}
class Capturing1<T>(T t, Capturing1<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing2<out T>(T t, Capturing2<T> c) {
    @error Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing3<in T>(T t, Capturing3<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing4<T>(T t, Capturing4<T> c) {
    @error Consumer<T> consumer;
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing5<out T>(T t, Capturing4<T> c) {
    Consumer<T> consumer = nothing;
    shared void callIt() {}
}


void unsharedVariance() {
    class Bar<out T>(T t, Bar<T> bar) {
        void accept(T tt) {}
        accept(t);
        //bar.accept(t);
    }    
    class Foo<in T>(T t, Foo<T> foo) {
         T get() => t;
         print(get());
         //foo.get();
    }
    class Baz<out T>(T t, Foo<T> foo) {
         class Inner(T t) {}
         print(Inner(t));
         //foo.Inner(t);
    }
}
void backdoorVariance() {
    class Bar<out T>(T t, Bar<T> bar) {
        void accept(@error T tt) {}
        accept(t);
        bar.accept(t);
    }    
    class Foo<in T>(T t, Foo<T> foo) {
         @error T get() => t;
         print(get());
         foo.get();
    }
    class Baz<out T>(T t, Baz<T> baz) {
         class Inner(@error T t) {}
         print(Inner(t));
         baz.Inner(t);
    }
}<commit_msg>add test<commit_after>class Consumer<in X>() {
    shared void consume(X x) {}
}
class Capturing0<out T>(T t, Capturing1<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() {}
}
class Capturing1<T>(T t, Capturing1<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing2<out T>(T t, Capturing2<T> c) {
    @error Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing3<in T>(T t, Capturing3<T> c) {
    Consumer<T> consumer=Consumer<T>();
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing4<T>(T t, Capturing4<T> c) {
    @error Consumer<T> consumer;
    shared void callIt() { 
        c.consumer.consume(t);
    }
}
class Capturing5<out T>(T t, Capturing4<T> c) {
    Consumer<T> consumer = nothing;
    shared void callIt() {}
}


void unsharedVariance() {
    class Bar<out T>(T t, Bar<T> bar) {
        void accept(T tt) {}
        accept(t);
        //bar.accept(t);
    }    
    class Foo<in T>(T t, Foo<T> foo) {
         T get() => t;
         print(get());
         //foo.get();
    }
    class Baz<out T>(T t, Foo<T> foo) {
         class Inner(T t) {}
         print(Inner(t));
         //foo.Inner(t);
    }
}
void backdoorVariance() {
    class Bar<out T>(T t, Bar<T> bar) {
        void accept(@error T tt) {}
        accept(t);
        bar.accept(t);
    }    
    class Foo<in T>(T t, Foo<T> foo) {
         @error T get() => t;
         print(get());
         foo.get();
    }
    class Baz<out T>(T t, Baz<T> baz) {
         class Inner(@error T t) {}
         print(Inner(t));
         baz.Inner(t);
    }
}

class WithMethodWithForwardParam<out T, in S>() {
    shared void method1()(t) { @error T t; }
    shared void method2()(f) { void f(@error S t); }
    shared void method3()(@error T t) {}
    shared void method4()(void f(@error S t)) {}
}
{'fraction_non_alphanumeric': 0.17335865436787845, 'fraction_numerical': 0.007596310363537711, 'mean_word_length': 2.268617021276596, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 78, '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': '7378819', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1349, 'n_words': 332}