| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/dart2js/conditional_import.dart:18:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. |
| // - 'HttpRequest' is from 'dart:_http'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'readyState'. |
| // request.readyState; // ok (from dart:html) |
| // ^^^^^^^^^^ |
| // |
| // pkg/front_end/testcases/dart2js/conditional_import.dart:23:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. |
| // request.certificate; // error |
| // ^^^^^^^^^^^ |
| // |
| // pkg/front_end/testcases/dart2js/conditional_import.dart:24:11: Error: The getter 'response' isn't defined for the class 'HttpRequest'. |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'response'. |
| // request.response; // error |
| // ^^^^^^^^ |
| // |
| // pkg/front_end/testcases/dart2js/conditional_import.dart:25:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'readyState'. |
| // request.readyState; // error |
| // ^^^^^^^^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_http" as _ht; |
| import "dart:io" as io; |
| |
| import "dart:io" as a; |
| import "org-dartlang-testcase:///conditional_import.dart" as b; |
| |
| class HttpRequest extends core::Object { |
| synthetic constructor •() → self::HttpRequest |
| : super core::Object::•() |
| ; |
| static method _#new#tearOff() → self::HttpRequest |
| return new self::HttpRequest::•(); |
| } |
| static method testA(_ht::HttpRequest request) → dynamic { |
| request.{_ht::HttpRequest::certificate}{io::X509Certificate?}; |
| request.{_ht::HttpRequest::response}{_ht::HttpResponse}; |
| invalid-expression "pkg/front_end/testcases/dart2js/conditional_import.dart:18:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. |
| - 'HttpRequest' is from 'dart:_http'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'readyState'. |
| request.readyState; // ok (from dart:html) |
| ^^^^^^^^^^" in request{<unresolved>}.readyState; |
| request.{core::Object::hashCode}{core::int}; |
| } |
| static method testB(self::HttpRequest request) → dynamic { |
| invalid-expression "pkg/front_end/testcases/dart2js/conditional_import.dart:23:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. |
| request.certificate; // error |
| ^^^^^^^^^^^" in request{<unresolved>}.certificate; |
| invalid-expression "pkg/front_end/testcases/dart2js/conditional_import.dart:24:11: Error: The getter 'response' isn't defined for the class 'HttpRequest'. |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'response'. |
| request.response; // error |
| ^^^^^^^^" in request{<unresolved>}.response; |
| invalid-expression "pkg/front_end/testcases/dart2js/conditional_import.dart:25:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dart2js/conditional_import.dart'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'readyState'. |
| request.readyState; // error |
| ^^^^^^^^^^" in request{<unresolved>}.readyState; |
| request.{core::Object::hashCode}{core::int}; |
| } |
| static method main() → void { |
| self::expect(false, #C1); |
| self::expect(true, #C1); |
| self::expect(false, #C1); |
| } |
| static method expect(dynamic expected, dynamic actual) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual)) |
| throw "Expected ${expected}, actual ${actual}"; |
| } |
| |
| constants { |
| #C1 = false |
| } |