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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart

Issue 14907008: Remove support for interface in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
index 1e359aa498ab2510bd930e67082d1364d571beb2..f9dad984cc5e2463f94d20e797ed258ba287ac89 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
@@ -88,6 +88,7 @@ class MemberListener extends NodeListener {
return enclosingElement.name == name;
}
+ // TODO(johnniwinther): Remove this method.
SourceString getMethodNameHack(Node methodName) {
Send send = methodName.asSend();
if (send == null) return methodName.asIdentifier().source;
@@ -106,7 +107,9 @@ class MemberListener extends NodeListener {
'implemented', node: send.receiver);
}
if (receiver.source != enclosingElement.name) {
- listener.onDeprecatedFeature(receiver, 'interface factories');
+ listener.reportErrorCode(receiver,
+ MessageKind.INVALID_CONSTRUCTOR_NAME,
+ {'name': enclosingElement.name});
}
return Elements.constructConstructorName(receiver.source,
selector.source);
@@ -143,7 +146,9 @@ class MemberListener extends NodeListener {
Identifier singleIdentifierName = method.name.asIdentifier();
if (singleIdentifierName != null && singleIdentifierName.source == name) {
if (name != enclosingElement.name) {
- listener.onDeprecatedFeature(method.name, 'interface factories');
+ listener.reportErrorCode(singleIdentifierName,
+ MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME,
+ {'name': enclosingElement.name});
}
}
ElementKind kind = ElementKind.FUNCTION;

Powered by Google App Engine
This is Rietveld 408576698