OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution
.dart"; | 10 import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution
.dart"; |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 804 |
805 script = ""; | 805 script = ""; |
806 final String CORELIB_WITH_INVALID_OBJECT = | 806 final String CORELIB_WITH_INVALID_OBJECT = |
807 '''print(var obj) {} | 807 '''print(var obj) {} |
808 class int {} | 808 class int {} |
809 class double {} | 809 class double {} |
810 class bool {} | 810 class bool {} |
811 class String {} | 811 class String {} |
812 class num {} | 812 class num {} |
813 class Function {} | 813 class Function {} |
814 class List<E> {} | 814 class List {} |
815 class Map {} | 815 class Map {} |
816 class Closure {} | 816 class Closure {} |
817 class Null {} | 817 class Null {} |
818 class StackTrace {} | 818 class StackTrace {} |
819 class Dynamic_ {} | 819 class Dynamic_ {} |
820 class Type {} | 820 class Type {} |
821 class Object { Object() : super(); }'''; | 821 class Object { Object() : super(); }'''; |
822 resolveConstructor(script, "Object o = new Object();", "Object", "", 1, | 822 resolveConstructor(script, "Object o = new Object();", "Object", "", 1, |
823 expectedWarnings: [], | 823 expectedWarnings: [], |
824 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT], | 824 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT], |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 }"""; | 965 }"""; |
966 asyncTest(() => compileScript(script2).then((compiler) { | 966 asyncTest(() => compileScript(script2).then((compiler) { |
967 expect(compiler, | 967 expect(compiler, |
968 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS], | 968 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS], |
969 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, | 969 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, |
970 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, | 970 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, |
971 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, | 971 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, |
972 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD]); | 972 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD]); |
973 })); | 973 })); |
974 } | 974 } |
OLD | NEW |