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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 23600017: Revert "Support dynamic as type literal." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 error(node, MessageKind.NO_INSTANCE_AVAILABLE, {'name': node}); 1821 error(node, MessageKind.NO_INSTANCE_AVAILABLE, {'name': node});
1822 } 1822 }
1823 return null; 1823 return null;
1824 } else if (node.isSuper()) { 1824 } else if (node.isSuper()) {
1825 if (!inInstanceContext) error(node, MessageKind.NO_SUPER_IN_STATIC); 1825 if (!inInstanceContext) error(node, MessageKind.NO_SUPER_IN_STATIC);
1826 if ((ElementCategory.SUPER & allowedCategory) == 0) { 1826 if ((ElementCategory.SUPER & allowedCategory) == 0) {
1827 error(node, MessageKind.INVALID_USE_OF_SUPER); 1827 error(node, MessageKind.INVALID_USE_OF_SUPER);
1828 } 1828 }
1829 return null; 1829 return null;
1830 } else { 1830 } else {
1831 Element element = node.source.slowToString() == 'dynamic' 1831 Element element = lookup(node, node.source);
1832 ? compiler.dynamicClass : lookup(node, node.source);
1833 if (element == null) { 1832 if (element == null) {
1834 if (!inInstanceContext) { 1833 if (!inInstanceContext) {
1835 element = warnAndCreateErroneousElement( 1834 element = warnAndCreateErroneousElement(
1836 node, node.source, MessageKind.CANNOT_RESOLVE, 1835 node, node.source, MessageKind.CANNOT_RESOLVE,
1837 {'name': node}); 1836 {'name': node});
1838 compiler.backend.registerThrowNoSuchMethod(mapping); 1837 compiler.backend.registerThrowNoSuchMethod(mapping);
1839 } 1838 }
1840 } else if (element.isErroneous()) { 1839 } else if (element.isErroneous()) {
1841 // Use the erroneous element. 1840 // Use the erroneous element.
1842 } else { 1841 } else {
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4150 return e; 4149 return e;
4151 } 4150 }
4152 4151
4153 /// Assumed to be called by [resolveRedirectingFactory]. 4152 /// Assumed to be called by [resolveRedirectingFactory].
4154 Element visitReturn(Return node) { 4153 Element visitReturn(Return node) {
4155 Node expression = node.expression; 4154 Node expression = node.expression;
4156 return finishConstructorReference(visit(expression), 4155 return finishConstructorReference(visit(expression),
4157 expression, expression); 4156 expression, expression);
4158 } 4157 }
4159 } 4158 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/namer.dart ('k') | tests/language/first_class_types_literals_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698