library test;
import self as self;
import "dart:core" as core;

typedef F<contravariant T extends core::Object* = dynamic> = (T*) →* void;
class C<T extends core::Object* = dynamic> extends core::Object {
  synthetic constructor •() → self::C<self::C::T*>*
    : super core::Object::•()
    ;
  get f1() → (self::C::T*) →* void
    return null;
  get f2() → core::List<(self::C::T*) →* void>* {
    return <(self::C::T*) →* void>[this.{self::C::f1}];
  }
}
static method g1(self::C<core::num*>* c) → void {
  (core::num*) →* void x = c.{self::C::f1} as{TypeError} (core::num*) →* void;
  core::print("hello");
  x.call(1.5);
}
static method g2(self::C<core::num*>* c) → void {
  (core::int*) →* void x = c.{self::C::f1} as{TypeError} (core::num*) →* void;
  x.call(1);
}
static method g3(self::C<core::num*>* c) → void {
  core::List<(core::num*) →* void>* x = c.{self::C::f2} as{TypeError} core::List<(core::num*) →* void>*;
}
static method main() → void {}
