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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2537303004: Disallow `null` in spanFromSpannable. (Closed)
Patch Set: Created 4 years 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 | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index db282a37ac9b721ad723f06578e3ff4a2815cdd6..16ef47def239ff05060757451ce5cd778b56b6dd 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1792,8 +1792,6 @@ class CompilerDiagnosticReporter extends DiagnosticReporter {
}
SourceSpan spanFromSpannable(Spannable node) {
- // TODO(johnniwinther): Disallow `node == null` ?
- if (node == null) return null;
if (node == CURRENT_ELEMENT_SPANNABLE) {
node = currentElement;
} else if (node == NO_LOCATION_SPANNABLE) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698