loader: update the mmodule location once the source is parsed
authorJean Privat <jean@pryen.org>
Fri, 18 Dec 2015 15:47:22 +0000 (10:47 -0500)
committerJean Privat <jean@pryen.org>
Fri, 18 Dec 2015 18:09:52 +0000 (13:09 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit
src/model/mmodule.nit

index c0891a1..8ccbd19 100644 (file)
@@ -1037,6 +1037,7 @@ redef class MModule
 
                # build the mmodule
                nmodule.mmodule = self
+               self.location = nmodule.location
                modelbuilder.build_a_mmodule(mgroup, nmodule)
 
                modelbuilder.parsed_modules.add self
index 6aa937e..f6ff6ff 100644 (file)
@@ -93,7 +93,7 @@ class MModule
        redef var name: String
 
        # The origin of the definition
-       var location: Location
+       var location: Location is writable
 
        # Alias for `name`
        redef fun to_s do return self.name