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

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

Issue 177543002: Constrain type annotations with deferred types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 "Did you forget a factory keyword here?"); 1149 "Did you forget a factory keyword here?");
1150 1150
1151 static const MessageKind DEFERRED_LIBRARY_NOT_FROM_MAIN = 1151 static const MessageKind DEFERRED_LIBRARY_NOT_FROM_MAIN =
1152 const MessageKind( 1152 const MessageKind(
1153 "DeferredLibrary used as an annotation here, " 1153 "DeferredLibrary used as an annotation here, "
1154 "but not used in the main library. Will not split the output.", 1154 "but not used in the main library. Will not split the output.",
1155 howToFix: 1155 howToFix:
1156 "Try adding a '@DeferredLibrary(...)' annotation in the main " 1156 "Try adding a '@DeferredLibrary(...)' annotation in the main "
1157 "library"); 1157 "library");
1158 1158
1159 static const MessageKind DEFERRED_LIBRARY_DART_2_DART =
1160 const MessageKind(
1161 "Deferred loading is not supported by the dart backend yet. "
1162 "Will not split the output.");
1163
1159 static const MessageKind DEFERRED_LIBRARY_WITHOUT_PREFIX = 1164 static const MessageKind DEFERRED_LIBRARY_WITHOUT_PREFIX =
1160 const MessageKind( 1165 const MessageKind(
1161 "This import is deferred but there is no prefix keyword.", 1166 "This import is deferred but there is no prefix keyword.",
1162 howToFix: 1167 howToFix:
1163 "Try adding a prefix to the import."); 1168 "Try adding a prefix to the import.");
1164 1169
1165 static const MessageKind DEFERRED_LIBRARY_DUPLICATE_PREFIX = 1170 static const MessageKind DEFERRED_LIBRARY_DUPLICATE_PREFIX =
1166 const MessageKind( 1171 const MessageKind(
1167 "The prefix of this deferred import is not unique.", 1172 "The prefix of this deferred import is not unique.",
1168 howToFix: 1173 howToFix:
1169 "Try changing the import prefix."); 1174 "Try changing the import prefix.");
1170 1175
1176 static const MessageKind DEFERRED_TYPE_ANNOTATION =
1177 const MessageKind(
1178 "The type #{node} is deferred. "
1179 "Deferred types are not valid as type annotations.",
1180 howToFix:
1181 "Try using a non-deferred abstract class as an interface.");
1182
1171 static const MessageKind ILLEGAL_STATIC = const MessageKind( 1183 static const MessageKind ILLEGAL_STATIC = const MessageKind(
1172 "Modifier static is only allowed on functions declared in " 1184 "Modifier static is only allowed on functions declared in "
1173 "a class."); 1185 "a class.");
1174 1186
1175 static const MessageKind STATIC_FUNCTION_BLOAT = const MessageKind( 1187 static const MessageKind STATIC_FUNCTION_BLOAT = const MessageKind(
1176 "Using '#{class}.#{name}' may lead to unnecessarily large " 1188 "Using '#{class}.#{name}' may lead to unnecessarily large "
1177 "generated code.", 1189 "generated code.",
1178 howToFix: 1190 howToFix:
1179 "Try adding '@MirrorsUsed(...)' as described at " 1191 "Try adding '@MirrorsUsed(...)' as described at "
1180 "https://goo.gl/Akrrog."); 1192 "https://goo.gl/Akrrog.");
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 return computeMessage(); 1902 return computeMessage();
1891 } 1903 }
1892 1904
1893 bool operator==(other) { 1905 bool operator==(other) {
1894 if (other is !Message) return false; 1906 if (other is !Message) return false;
1895 return (kind == other.kind) && (toString() == other.toString()); 1907 return (kind == other.kind) && (toString() == other.toString());
1896 } 1908 }
1897 1909
1898 int get hashCode => throw new UnsupportedError('Message.hashCode'); 1910 int get hashCode => throw new UnsupportedError('Message.hashCode');
1899 } 1911 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698