loader: scan_group does not identify file already identified as group.
[nit.git] / src / loader.nit
index 7ff71a6..a914b56 100644 (file)
@@ -532,10 +532,11 @@ redef class ModelBuilder
                        var fp = p/f
                        var g = get_mgroup(fp)
                        # Recursively scan for groups of the same package
-                       if g != null and g.mpackage == mgroup.mpackage then
+                       if g == null then
+                               identify_file(fp)
+                       else if g.mpackage == mgroup.mpackage then
                                scan_group(g)
                        end
-                       identify_file(fp)
                end
        end