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

Unified Diff: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart

Issue 2940453002: Add offsets to the `== null` calls inserted by null-aware desugaring. (Closed)
Patch Set: Created 3 years, 6 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
Index: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
index e62ede56ac3c587c29db9965d08421340c353473..f837e4f50ad2ac1e08556f5e211f9eccf8096b7d 100644
--- a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
+++ b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
@@ -156,6 +156,9 @@ class ValidatingInstrumentation implements Instrumentation {
void record(
Uri uri, int offset, String property, InstrumentationValue value) {
uri = Uri.base.resolveUri(uri);
+ if (offset == -1) {
+ throw _formatProblem(uri, 0, 'No offset for $property=$value', null);
+ }
var expectationsForUri = _unsatisfiedExpectations[uri];
if (expectationsForUri == null) return;
var expectationsAtOffset = expectationsForUri[offset];

Powered by Google App Engine
This is Rietveld 408576698