blob: 0f8a5da743c8499aaf7867c407664a1bfde9ea76 [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:test" as test;
import "dart:core" as core;
import "dart:test";
static method main() dynamic {
test::Class c = new test::Class::•();
self::expect(42, c.{test::Class::method1}(){() core::int});
self::expect(87, c.{test::Class::method2}(){() core::int});
self::expect(123, c.{test::Class::method3}(){() core::int});
}
static method expect(dynamic expected, dynamic actual) dynamic {
if(!(expected =={core::Object::==}{(core::Object) core::bool} actual)) {
throw "Expected ${expected}, actual ${actual}";
}
}
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/multiple_class_patches/patch_lib2.dart:9:7: Error: 'Class' is already declared in this scope.
// class Class {
// ^^^^^
// pkg/front_end/testcases/general/multiple_class_patches/patch_lib1.dart:9:7: Context: Previous declaration of 'Class'.
// class Class {
// ^^^^^
//
import self as test;
import "dart:_internal" as _in;
import "dart:core" as core;
import "dart:_internal";
import "dart:_internal";
@#C1
class Class#1#1 extends core::Object { // from org-dartlang-testcase:///patch_lib2.dart
synthetic constructor •() test::Class#1#1
: super core::Object::•()
;
@#C1
method method2() core::int
return 87;
@#C1
method method3() core::int
return 123;
}
@#C1
class Class extends core::Object {
synthetic constructor •() test::Class
: super core::Object::•()
;
@#C1
method /* from org-dartlang-testcase:///patch_lib1.dart */ method1() core::int
return 42;
external method method2() core::int;
@#C1
method /* from org-dartlang-testcase:///patch_lib1.dart */ method3() core::int
return 321;
}
constants {
#C1 = _in::_Patch {}
}