blob: 4da117d4c650a8dae5448e77dbfa491115e0412a [file] [log] [blame]
library test.qualified.main;
//
// Problems in library:
//
// pkg/front_end/testcases/qualified.dart:13:11: Error: The name of a constructor must match the name of the enclosing class.
// factory WrongName() {}
// ^^^^^^^^^
// pkg/front_end/testcases/qualified.dart:11:7: Context: The name of the enclosing class is 'Bad'.
// class Bad extends lib.Missing {
// ^^^
//
// pkg/front_end/testcases/qualified.dart:11:19: Warning: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^^^^^^^^^^^
//
// pkg/front_end/testcases/qualified.dart:12:3: Warning: Type 'lib.Missing' not found.
// lib.Missing method() {}
// ^^^^^^^^^^^
//
// pkg/front_end/testcases/qualified.dart:11:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^^^^^^^^^^^
//
// pkg/front_end/testcases/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
// class IllegalSupertype extends lib.VoidFunction {}
// ^
//
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 class _WithMixin&Supertype&Mixin extends lib::Supertype implements lib::Mixin {
synthetic constructor •() self::_WithMixin&Supertype&Mixin
: super lib::Supertype::•()
;
method /* from org-dartlang-testcase:///qualified_lib.dart */ foo() dynamic {
core::print("I'm Mixin.foo");
}
}
class WithMixin extends self::_WithMixin&Supertype&Mixin {
synthetic constructor •() self::WithMixin
: super self::_WithMixin&Supertype&Mixin::•()
;
}
class IllegalSupertype extends core::Object {
synthetic constructor •() self::IllegalSupertype
: super core::Object::•()
;
}
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>
: super core::Object::•()
;
constructor a() self::C<self::C::T>
: super core::Object::•()
;
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;
}
static method main() dynamic {
new self::C::•<core::String>();
new self::C::a<core::String>();
new lib::C::a<core::String>();
new lib::C::•<core::String>();
new lib::C::a<core::String>();
new lib::C::a<core::String>();
new self::WithMixin::•().supertypeMethod();
new self::WithMixin::•().foo();
new self::IllegalSupertype::•();
}
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>
: super self::C::•()
;
constructor a() lib::C<lib::C::T>
: super self::C::•()
;
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
: super core::Object::•()
;
method supertypeMethod() dynamic {
core::print("I'm supertypeMethod form lib.Supertype");
}
}
abstract class Mixin extends core::Object {
synthetic constructor •() lib::Mixin
: super core::Object::•()
;
method foo() dynamic {
core::print("I'm Mixin.foo");
}
}