// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // SharedOptions=--enable-experiment=variance import 'package:expect/expect.dart'; abstract class A { int foo(X bar); } class B {} class C extends A { @override int foo(T bar) { return 2; } } mixin D {} class E1 {} mixin E {} class F = Object with D; class G {} class H {} main() { B b = B(); C c = C(); Expect.equals(2, c.foo(3)); F f = F(); G g = G(); H h = H(); }