analysis_options: disallow implicit casts
diff --git a/analysis_options.yaml b/analysis_options.yaml
index d5d5213..6e8826b 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,7 +1,7 @@
 include: package:pedantic/analysis_options.yaml
 analyzer:
-#  strong-mode:
-#    implicit-casts: false
+  strong-mode:
+    implicit-casts: false
 linter:
   rules:
     - always_declare_return_types
diff --git a/lib/src/exception.dart b/lib/src/exception.dart
index 3710ae8..bad08f6 100644
--- a/lib/src/exception.dart
+++ b/lib/src/exception.dart
@@ -8,7 +8,7 @@
 
 /// An exception thrown by a [StringScanner] that failed to parse a string.
 class StringScannerException extends SourceSpanFormatException {
-  String get source => super.source;
+  String get source => super.source as String;
 
   /// The URL of the source file being parsed.
   ///
diff --git a/lib/src/string_scanner.dart b/lib/src/string_scanner.dart
index f6243aa..4a1d10c 100644
--- a/lib/src/string_scanner.dart
+++ b/lib/src/string_scanner.dart
@@ -58,7 +58,8 @@
   /// URL of the source of the string being scanned, if available. It can be
   /// a [String], a [Uri], or `null`.
   StringScanner(this.string, {sourceUrl, int position})
-      : sourceUrl = sourceUrl is String ? Uri.parse(sourceUrl) : sourceUrl {
+      : sourceUrl =
+            sourceUrl is String ? Uri.parse(sourceUrl) : sourceUrl as Uri {
     if (position != null) this.position = position;
   }