| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 class String {} | 832 class String {} |
| 833 class num {} | 833 class num {} |
| 834 class Function {} | 834 class Function {} |
| 835 class List<E> {} | 835 class List<E> {} |
| 836 class Map {} | 836 class Map {} |
| 837 class Closure {} | 837 class Closure {} |
| 838 class Null {} | 838 class Null {} |
| 839 class StackTrace {} | 839 class StackTrace {} |
| 840 class Dynamic_ {} | 840 class Dynamic_ {} |
| 841 class Type {} | 841 class Type {} |
| 842 class Object { Object() : super(); }'''; | 842 class Object { Object() : super(); } |
| 843 const proxy = 0;'''; |
| 843 resolveConstructor(script, "Object o = new Object();", "Object", "", 1, | 844 resolveConstructor(script, "Object o = new Object();", "Object", "", 1, |
| 844 expectedWarnings: [], | 845 expectedWarnings: [], |
| 845 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT], | 846 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT], |
| 846 corelib: CORELIB_WITH_INVALID_OBJECT); | 847 corelib: CORELIB_WITH_INVALID_OBJECT); |
| 847 } | 848 } |
| 848 | 849 |
| 849 map(ResolverVisitor visitor) { | 850 map(ResolverVisitor visitor) { |
| 850 CollectingTreeElements elements = visitor.mapping; | 851 CollectingTreeElements elements = visitor.mapping; |
| 851 return elements.map; | 852 return elements.map; |
| 852 } | 853 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 }"""; | 987 }"""; |
| 987 asyncTest(() => compileScript(script2).then((compiler) { | 988 asyncTest(() => compileScript(script2).then((compiler) { |
| 988 expect(compiler, | 989 expect(compiler, |
| 989 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS], | 990 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS], |
| 990 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, | 991 [MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, |
| 991 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, | 992 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, |
| 992 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, | 993 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, |
| 993 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD]); | 994 MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD]); |
| 994 })); | 995 })); |
| 995 } | 996 } |
| OLD | NEW |