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

abstract class A extends core::Object {
  synthetic constructor •() → void
    : super core::Object::•()
    ;
  abstract set x(core::int value) → void;
}
class B extends core::Object {
  synthetic constructor •() → void
    : super core::Object::•()
    ;
  set x(core::int value) → void {}
}
class C extends self::A {
  field core::int x = null;
  synthetic constructor •() → void
    : super self::A::•()
    ;
}
class D extends self::B {
  field core::int x = null;
  synthetic constructor •() → void
    : super self::B::•()
    ;
}
class E extends core::Object implements self::A {
  field core::int x = null;
  synthetic constructor •() → void
    : super core::Object::•()
    ;
}
class F extends core::Object implements self::B {
  field core::int x = null;
  synthetic constructor •() → void
    : super core::Object::•()
    ;
}
abstract class _G&Object&B extends core::Object implements self::B {
  synthetic constructor •() → void
    : super core::Object::•()
    ;
  set x(core::int value) → void {}
}
class G extends self::_G&Object&B {
  field core::int x = null;
  synthetic constructor •() → void
    : super core::Object::•()
    ;
}
static method main() → dynamic {}
