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

Unified Diff: pkg/kernel/test/type_parser.dart

Issue 2523673005: Enable strong-mode for pkg/kernel and fix some strong-mode warnings. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/test/batch_consistency.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/test/type_parser.dart
diff --git a/pkg/kernel/test/type_parser.dart b/pkg/kernel/test/type_parser.dart
index e933c16af72df9282889e9b83eea065de79a11dc..d2e1b4dd9841d065d05a28291324ed1b6ffba33f 100644
--- a/pkg/kernel/test/type_parser.dart
+++ b/pkg/kernel/test/type_parser.dart
@@ -174,8 +174,7 @@ class DartTypeParser {
}
}
- void parseParameterList(
- List<DartType> positional, List<NamedType> named) {
+ void parseParameterList(List<DartType> positional, List<NamedType> named) {
int token = scanToken();
assert(token == Token.LeftParen);
token = peekToken();
@@ -215,7 +214,7 @@ class DartTypeParser {
types.add(parseType());
token = scanToken();
if (token != Token.Comma && token != close) {
- return fail('Unterminated list');
+ throw fail('Unterminated list');
}
}
return types;
@@ -243,7 +242,7 @@ class DartTypeParser {
typeParameters.add(parseAndPushTypeParameter());
token = scanToken();
if (token != Token.Comma && token != Token.RightAngle) {
- return fail('Unterminated type parameter list');
+ throw fail('Unterminated type parameter list');
}
}
return typeParameters;
@@ -275,8 +274,8 @@ class DartTypeParser {
class LazyTypeEnvironment {
final Map<String, Class> classes = <String, Class>{};
final Map<String, TypeParameter> typeParameters = <String, TypeParameter>{};
- final Library dummyLibrary = new Library(new Uri(path: 'dummy.dart'),
- name: 'lib');
+ final Library dummyLibrary =
+ new Library(new Uri(path: 'dummy.dart'), name: 'lib');
TreeNode lookup(String name) {
return name.length == 1
« no previous file with comments | « pkg/kernel/test/batch_consistency.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698