Make SourceSpanException.source a getter
The override in
https://github.com/dart-lang/string_scanner/blob/master/lib/src/exception.dart
is causing a problem in DDC / strong mode.
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//1722603005 .
diff --git a/lib/src/span_exception.dart b/lib/src/span_exception.dart
index ab07046..921e620 100644
--- a/lib/src/span_exception.dart
+++ b/lib/src/span_exception.dart
@@ -32,10 +32,13 @@
/// 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);
}