Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 32de304

Browse files
committed
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. [email protected] Review URL: https://codereview.chromium.org//1722603005 .
1 parent 3171891 commit 32de304

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/src/span_exception.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ class SourceSpanException implements Exception {
3232
/// A [SourceSpanException] that's also a [FormatException].
3333
class SourceSpanFormatException extends SourceSpanException
3434
implements FormatException {
35-
final source;
35+
final _source;
36+
37+
// Subclasses may narrow the type.
38+
dynamic get source => _source;
3639

3740
int get offset => span == null ? null : span.start.offset;
3841

39-
SourceSpanFormatException(String message, SourceSpan span, [this.source])
42+
SourceSpanFormatException(String message, SourceSpan span, [this._source])
4043
: super(message, span);
4144
}

0 commit comments

Comments
 (0)