compiler: resolve types when doing new NativeArray
[nit.git] / src / model_utils.nit
index ff1a8d9..9297793 100644 (file)
@@ -525,9 +525,9 @@ end
 
 # Sort mentities by their name
 class MEntityNameSorter
-       super AbstractSorter[MEntity]
+       super Comparator
+       redef type COMPARED: MEntity
        redef fun compare(a, b) do return a.name <=> b.name
-       init do end
 end
 
 # Sort MConcerns based on the module importation hierarchy ranking
@@ -540,9 +540,8 @@ end
 # If both `a` and `b` have the same ranking,
 # ordering is based on lexicographic comparison of `a.name` and `b.name`
 class MConcernRankSorter
-       super AbstractSorter[MConcern]
-
-       init do end
+       super Comparator
+       redef type COMPARED: MConcern
 
        redef fun compare(a, b) do
                if a.concern_rank == b.concern_rank then