| 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 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 | 7 |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import 'package:compiler/src/constants/expressions.dart'; | 10 import 'package:compiler/src/constants/expressions.dart'; |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 MockCompiler.create((MockCompiler compiler) { | 721 MockCompiler.create((MockCompiler compiler) { |
| 722 compiler.parseScript("""class A extends B {} | 722 compiler.parseScript("""class A extends B {} |
| 723 class B extends A {} | 723 class B extends A {} |
| 724 main() { return new A(); }"""); | 724 main() { return new A(); }"""); |
| 725 FunctionElement mainElement = compiler.mainApp.find(MAIN); | 725 FunctionElement mainElement = compiler.mainApp.find(MAIN); |
| 726 compiler.resolver.resolve(mainElement); | 726 compiler.resolver.resolve(mainElement); |
| 727 Expect.equals(0, compiler.warnings.length); | 727 Expect.equals(0, compiler.warnings.length); |
| 728 Expect.equals(2, compiler.errors.length); | 728 Expect.equals(2, compiler.errors.length); |
| 729 Expect.equals(MessageKind.CYCLIC_CLASS_HIERARCHY, | 729 Expect.equals(MessageKind.CYCLIC_CLASS_HIERARCHY, |
| 730 compiler.errors[0].message.kind); | 730 compiler.errors[0].message.kind); |
| 731 Expect.equals(MessageKind.CANNOT_FIND_CONSTRUCTOR, | 731 Expect.equals(MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR, |
| 732 compiler.errors[1].message.kind); | 732 compiler.errors[1].message.kind); |
| 733 }), | 733 }), |
| 734 MockCompiler.create((MockCompiler compiler) { | 734 MockCompiler.create((MockCompiler compiler) { |
| 735 compiler.parseScript("""abstract class A extends B {} | 735 compiler.parseScript("""abstract class A extends B {} |
| 736 abstract class B extends A {} | 736 abstract class B extends A {} |
| 737 class C implements A {} | 737 class C implements A {} |
| 738 main() { return new C(); }"""); | 738 main() { return new C(); }"""); |
| 739 FunctionElement mainElement = compiler.mainApp.find(MAIN); | 739 FunctionElement mainElement = compiler.mainApp.find(MAIN); |
| 740 compiler.resolver.resolve(mainElement); | 740 compiler.resolver.resolve(mainElement); |
| 741 Expect.equals(0, compiler.warnings.length); | 741 Expect.equals(0, compiler.warnings.length); |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 } | 1411 } |
| 1412 main() => A.m(); | 1412 main() => A.m(); |
| 1413 ''', functionName: 'm'); | 1413 ''', functionName: 'm'); |
| 1414 check(''' | 1414 check(''' |
| 1415 class A { | 1415 class A { |
| 1416 m() => () => await - 3; | 1416 m() => () => await - 3; |
| 1417 } | 1417 } |
| 1418 main() => new A().m(); | 1418 main() => new A().m(); |
| 1419 ''', className: 'A'); | 1419 ''', className: 'A'); |
| 1420 } | 1420 } |
| OLD | NEW |