Index: lib/src/span_exception.dart |
diff --git a/lib/src/span_exception.dart b/lib/src/span_exception.dart |
index ab07046143047601733084c0ea9c433a7158ac64..921e62095353c1ae7d4278ff7477094892cced32 100644 |
--- a/lib/src/span_exception.dart |
+++ b/lib/src/span_exception.dart |
@@ -32,10 +32,13 @@ class SourceSpanException implements Exception { |
/// A [SourceSpanException] that's also a [FormatException]. |
class SourceSpanFormatException extends SourceSpanException |
implements FormatException { |
- final source; |
+ final _source; |
+ |
+ // Subclasses may narrow the type. |
+ dynamic get source => _source; |
int get offset => span == null ? null : span.start.offset; |
- SourceSpanFormatException(String message, SourceSpan span, [this.source]) |
+ SourceSpanFormatException(String message, SourceSpan span, [this._source]) |
: super(message, span); |
} |