much better indeed
diff --git a/lib/builder.dart b/lib/builder.dart
index 1f36b99..c8596fe 100644
--- a/lib/builder.dart
+++ b/lib/builder.dart
@@ -60,7 +60,7 @@
 }
 
 /// An entry in the source map builder.
-class Entry implements Comparable {
+class Entry implements Comparable<Entry> {
   /// Span denoting the original location in the input source file
   final SourceLocation source;
 
@@ -77,8 +77,7 @@
   /// location in the target file. We sort primarily by the target offset
   /// because source map files are encoded by printing each mapping in order as
   /// they appear in the target file.
-  int compareTo(_other) {
-    Entry other = _other as Entry;
+  int compareTo(Entry other) {
     int res = target.compareTo(other.target);
     if (res != 0) return res;
     res = source.sourceUrl.toString().compareTo(