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

Unified Diff: dart/frog/leg/scanner/parser.dart

Issue 9349014: Fix NPE in parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: changes Created 8 years, 10 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
« no previous file with comments | « no previous file | dart/tests/language/src/SyntaxTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/parser.dart
diff --git a/dart/frog/leg/scanner/parser.dart b/dart/frog/leg/scanner/parser.dart
index f2427bcb21a2508ed5b0fdb59749ba74d6ad655e..af9cc7c50a27565a180b1ec4f7da0239f835f145 100644
--- a/dart/frog/leg/scanner/parser.dart
+++ b/dart/frog/leg/scanner/parser.dart
@@ -317,7 +317,9 @@ class Parser {
Token parseTypeVariablesOpt(Token token) {
if (optional('<', token)) {
BeginGroupToken beginGroupToken = token;
- token = beginGroupToken.endGroup.next;
+ if (beginGroupToken.endGroup !== null) {
ngeoffray 2012/02/07 13:40:27 Please add a comment that you're considering the f
ahe 2012/02/07 14:24:47 Done.
+ token = beginGroupToken.endGroup.next;
+ }
}
listener.handleNoTypeVariables(token);
return token;
« no previous file with comments | « no previous file | dart/tests/language/src/SyntaxTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698