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

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

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix two long lines. Created 8 years, 2 months 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 | Annotate | Revision Log
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:uri'); 5 #import('dart:uri');
6 6
7 #import("../../../lib/compiler/implementation/leg.dart"); 7 #import("../../../lib/compiler/implementation/leg.dart");
8 #import("../../../lib/compiler/implementation/elements/elements.dart"); 8 #import("../../../lib/compiler/implementation/elements/elements.dart");
9 #import("../../../lib/compiler/implementation/tree/tree.dart"); 9 #import("../../../lib/compiler/implementation/tree/tree.dart");
10 #import("../../../lib/compiler/implementation/scanner/scannerlib.dart"); 10 #import("../../../lib/compiler/implementation/scanner/scannerlib.dart");
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 class int {} 700 class int {}
701 class double {} 701 class double {}
702 class bool {} 702 class bool {}
703 class String {} 703 class String {}
704 class num {} 704 class num {}
705 class Function {} 705 class Function {}
706 class List {} 706 class List {}
707 class Closure {} 707 class Closure {}
708 class Null {} 708 class Null {}
709 class Dynamic_ {} 709 class Dynamic_ {}
710 class Type {}
710 class Object { Object() : super(); }'''; 711 class Object { Object() : super(); }''';
711 resolveConstructor(script, "Object o = new Object();", "Object", "Object", 1, 712 resolveConstructor(script, "Object o = new Object();", "Object", "Object", 1,
712 [], [MessageKind.SUPER_INITIALIZER_IN_OBJECT], 713 [], [MessageKind.SUPER_INITIALIZER_IN_OBJECT],
713 corelib: CORELIB_WITH_INVALID_OBJECT); 714 corelib: CORELIB_WITH_INVALID_OBJECT);
714 } 715 }
715 716
716 map(ResolverVisitor visitor) { 717 map(ResolverVisitor visitor) {
717 TreeElementMapping elements = visitor.mapping; 718 TreeElementMapping elements = visitor.mapping;
718 return elements.map; 719 return elements.map;
719 } 720 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 var d = new D(); 783 var d = new D();
783 --d; 784 --d;
784 }"""; 785 }""";
785 final compiler = compileScript(script); 786 final compiler = compileScript(script);
786 787
787 checkMemberResolved(compiler, 'A', operatorName('+', false)); 788 checkMemberResolved(compiler, 'A', operatorName('+', false));
788 checkMemberResolved(compiler, 'B', operatorName('+', false)); 789 checkMemberResolved(compiler, 'B', operatorName('+', false));
789 checkMemberResolved(compiler, 'C', operatorName('-', false)); 790 checkMemberResolved(compiler, 'C', operatorName('-', false));
790 checkMemberResolved(compiler, 'D', operatorName('-', false)); 791 checkMemberResolved(compiler, 'D', operatorName('-', false));
791 } 792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698