library test.qualified.main;
//
// Problems in library:
//
// pkg/front_end/testcases/general_nnbd_opt_out/qualified.dart:15:11: Error: The name of a constructor must match the name of the enclosing class.
//   factory WrongName() {}
//           ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/qualified.dart:13:7: Context: The name of the enclosing class is 'Bad'.
// class Bad extends lib.Missing {
//       ^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/qualified.dart:13:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
//                   ^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/qualified.dart:14:3: Error: Type 'lib.Missing' not found.
//   lib.Missing method() {}
//   ^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/qualified.dart:20:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
// class IllegalSupertype extends lib.VoidFunction {}
//       ^
// pkg/front_end/testcases/general_nnbd_opt_out/qualified_lib.dart:29:9: Context: The issue arises via this type alias.
// typedef VoidFunction = void Function();
//         ^
//
import self as self;
import "dart:core" as core;
import "qualified_lib.dart" as lib;

import "org-dartlang-testcase:///qualified_lib.dart" as lib;

part qualified_part.dart;
class Bad extends core::Object {
  method method() → invalid-type
    ;
  static factory WrongName() → self::Bad*
    ;
  abstract member-signature get _identityHashCode() → core::int*;
  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
  abstract member-signature operator ==(dynamic other) → core::bool*;
  abstract member-signature get hashCode() → core::int*;
  abstract member-signature method toString() → core::String*;
  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
  abstract member-signature get runtimeType() → core::Type*;
}
abstract class _WithMixin&Supertype&Mixin = lib::Supertype with lib::Mixin /*isAnonymousMixin*/  {
  synthetic constructor •() → self::_WithMixin&Supertype&Mixin*
    : super lib::Supertype::•()
    ;
}
class WithMixin extends self::_WithMixin&Supertype&Mixin {
  synthetic constructor •() → self::WithMixin*
    ;
}
class IllegalSupertype extends core::Object {
  synthetic constructor •() → self::IllegalSupertype*
    ;
  abstract member-signature get _identityHashCode() → core::int*;
  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
  abstract member-signature operator ==(dynamic other) → core::bool*;
  abstract member-signature get hashCode() → core::int*;
  abstract member-signature method toString() → core::String*;
  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
  abstract member-signature get runtimeType() → core::Type*;
}
class C<T extends core::Object* = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
  static field dynamic _redirecting# = <dynamic>[self::C::b];
  constructor •() → self::C<self::C::T*>*
    ;
  constructor a() → self::C<self::C::T*>*
    ;
  static factory b<T extends core::Object* = dynamic>() → self::C<self::C::b::T*>*
    let dynamic #redirecting_factory = lib::C::b in let self::C::b::T* #typeArg0 = null in invalid-expression;
  abstract member-signature get _identityHashCode() → core::int*;
  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
  abstract member-signature operator ==(dynamic other) → core::bool*;
  abstract member-signature get hashCode() → core::int*;
  abstract member-signature method toString() → core::String*;
  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
  abstract member-signature get runtimeType() → core::Type*;
}
static method main() → dynamic
  ;

library test.qualified.lib;
import self as lib;
import "dart:core" as core;
import "qualified.dart" as self;

import "org-dartlang-testcase:///qualified.dart" as main;

typedef VoidFunction = () →* void;
class C<T extends core::Object* = dynamic> extends self::C<lib::C::T*> {
  static field dynamic _redirecting# = <dynamic>[lib::C::b];
  constructor •() → lib::C<lib::C::T*>*
    ;
  constructor a() → lib::C<lib::C::T*>*
    ;
  static factory b<T extends core::Object* = dynamic>() → lib::C<lib::C::b::T*>*
    let dynamic #redirecting_factory = lib::C::a in let lib::C::b::T* #typeArg0 = null in invalid-expression;
}
class Supertype extends core::Object {
  synthetic constructor •() → lib::Supertype*
    ;
  method supertypeMethod() → dynamic
    ;
  abstract member-signature get _identityHashCode() → core::int*;
  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
  abstract member-signature operator ==(dynamic other) → core::bool*;
  abstract member-signature get hashCode() → core::int*;
  abstract member-signature method toString() → core::String*;
  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
  abstract member-signature get runtimeType() → core::Type*;
}
abstract class Mixin extends core::Object {
  synthetic constructor •() → lib::Mixin*
    ;
  method foo() → dynamic
    ;
  abstract member-signature get _identityHashCode() → core::int*;
  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
  abstract member-signature operator ==(dynamic other) → core::bool*;
  abstract member-signature get hashCode() → core::int*;
  abstract member-signature method toString() → core::String*;
  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
  abstract member-signature get runtimeType() → core::Type*;
}
