Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: tests/compiler/dart2js/resolver_test.dart

Issue 1423623008: Improve messages and static use for super/this-calls. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/message_kind_helper.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/message_kind_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698