Revert the revert of the flow analysis workaround (#61)
* Revert "Prep to release 1.8.0-nullsafety.1"
This reverts commit 17f16a85e55081509edc8dc6f233ab3d07a7d957.
* update pubspec/changelog
diff --git a/.travis.yml b/.travis.yml
index 290d9a2..8a4761a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: dart
dart:
-- be/raw/latest
+- dev
jobs:
include:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b70bc3a..ba22523 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 1.8.0-nullsafety.2-dev
+
+* Revert unnecessary null check fix (sdk fix wont land in 2.10 stable).
+
# 1.8.0-nullsafety.1
* Fixes a newly recognized unnecessary null check to remove warnings.
diff --git a/lib/src/highlighter.dart b/lib/src/highlighter.dart
index f622c4e..1c39185 100644
--- a/lib/src/highlighter.dart
+++ b/lib/src/highlighter.dart
@@ -292,7 +292,9 @@
? _primaryColor
: _secondaryColor;
var foundCurrent = false;
- for (var highlight in highlightsByColumn) {
+ for (var tmp in highlightsByColumn) {
+ // Work around https://github.com/dart-lang/sdk/issues/43136
+ final highlight = tmp;
final startLine = highlight?.span.start.line;
final endLine = highlight?.span.end.line;
if (current != null && highlight == current) {
diff --git a/pubspec.yaml b/pubspec.yaml
index 597afdf..76e7b4d 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,12 +1,12 @@
name: source_span
-version: 1.8.0-nullsafety.1
+version: 1.8.0-nullsafety.2-dev
description: A library for identifying source spans and locations.
homepage: https://github.com/dart-lang/source_span
environment:
# This must remain a tight constraint until nnbd is stable
- sdk: '>=2.10.0-137.0 <2.10.0'
+ sdk: '>=2.10.0-0.0 <2.10.0'
dependencies:
charcode: '>=1.2.0-nullsafety <1.2.0'