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

Unified Diff: pkg/analysis_server/test/analysis/notification_outline_test.dart

Issue 652903006: Issue 21373. Fix for removing line info in case of exception (causes NPE in outline computer). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/notification_outline_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_outline_test.dart b/pkg/analysis_server/test/analysis/notification_outline_test.dart
index 5ab518260f6697d5ebf4aef94d1981623725b1a8..23567cbe9e828f33383bd6f2faf959d8b77ad3be 100644
--- a/pkg/analysis_server/test/analysis/notification_outline_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_outline_test.dart
@@ -256,6 +256,26 @@ class B {
});
}
+ /**
+ * Code like this caused NPE in the past.
+ *
+ * https://code.google.com/p/dart/issues/detail?id=21373
+ */
+ test_invalidGetterInConstructor() {
+ addTestFile('''
+class A {
+ A() {
+ get badGetter {
+ const int CONST = 0;
+ }
+ }
+}
+''');
+ return prepareOutline().then((_) {
+ expect(outline, isNotNull);
+ });
+ }
+
test_localFunctions() {
addTestFile('''
class A {
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698