| library /*isNonNullableByDefault*/; | |
| // | |
| // Problems in library: | |
| // | |
| // pkg/front_end/testcases/dartdevc/conditional_import.dart:20:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| // - 'HttpRequest' is from 'dart:html'. | |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. | |
| // request.certificate; // error (from dart:io) | |
| // ^^^^^^^^^^^ | |
| // | |
| // pkg/front_end/testcases/dartdevc/conditional_import.dart:27:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| // - 'HttpRequest' is from 'dart:html'. | |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. | |
| // request.certificate; // error (from dart:io) | |
| // ^^^^^^^^^^^ | |
| // | |
| // pkg/front_end/testcases/dartdevc/conditional_import.dart:34:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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/dartdevc/conditional_import.dart:35:11: Error: The getter 'response' isn't defined for the class 'HttpRequest'. | |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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/dartdevc/conditional_import.dart:36:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. | |
| // - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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:html" as html; | |
| import "dart:html" as a; | |
| import "dart:html" as b; | |
| import "org-dartlang-testcase:///conditional_import.dart" as c; | |
| 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(html::HttpRequest request) → dynamic { | |
| invalid-expression "pkg/front_end/testcases/dartdevc/conditional_import.dart:20:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| - 'HttpRequest' is from 'dart:html'. | |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. | |
| request.certificate; // error (from dart:io) | |
| ^^^^^^^^^^^" in request{<unresolved>}.certificate; | |
| request.{html::HttpRequest::response}{dynamic}; | |
| request.{html::HttpRequest::readyState}{core::int}; | |
| request.{core::Object::hashCode}{core::int}; | |
| } | |
| static method testB(html::HttpRequest request) → dynamic { | |
| invalid-expression "pkg/front_end/testcases/dartdevc/conditional_import.dart:27:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| - 'HttpRequest' is from 'dart:html'. | |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'certificate'. | |
| request.certificate; // error (from dart:io) | |
| ^^^^^^^^^^^" in request{<unresolved>}.certificate; | |
| request.{html::HttpRequest::response}{dynamic}; | |
| request.{html::HttpRequest::readyState}{core::int}; | |
| request.{core::Object::hashCode}{core::int}; | |
| } | |
| static method testC(self::HttpRequest request) → dynamic { | |
| invalid-expression "pkg/front_end/testcases/dartdevc/conditional_import.dart:34:11: Error: The getter 'certificate' isn't defined for the class 'HttpRequest'. | |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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/dartdevc/conditional_import.dart:35:11: Error: The getter 'response' isn't defined for the class 'HttpRequest'. | |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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/dartdevc/conditional_import.dart:36:11: Error: The getter 'readyState' isn't defined for the class 'HttpRequest'. | |
| - 'HttpRequest' is from 'pkg/front_end/testcases/dartdevc/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, #C2); | |
| 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 | |
| #C2 = true | |
| } |