src: mass rename project->package
[nit.git] / src / modelize / modelize_property.nit
index af3ae39..eec36f4 100644 (file)
@@ -629,12 +629,12 @@ redef class APropdef
                                return false
                        end
 
-                       # Check for full-name conflicts in the project.
-                       # A public property should have a unique qualified name `project::class::prop`.
+                       # Check for full-name conflicts in the package.
+                       # A public property should have a unique qualified name `package::class::prop`.
                        if mprop.intro_mclassdef.mmodule.mgroup != null and mprop.visibility >= protected_visibility then
                                var others = modelbuilder.model.get_mproperties_by_name(mprop.name)
                                if others != null then for other in others do
-                                       if other != mprop and other.intro_mclassdef.mmodule.mgroup != null and other.intro_mclassdef.mmodule.mgroup.mproject == mprop.intro_mclassdef.mmodule.mgroup.mproject and other.intro_mclassdef.mclass.name == mprop.intro_mclassdef.mclass.name and other.visibility >= protected_visibility then
+                                       if other != mprop and other.intro_mclassdef.mmodule.mgroup != null and other.intro_mclassdef.mmodule.mgroup.mpackage == mprop.intro_mclassdef.mmodule.mgroup.mpackage and other.intro_mclassdef.mclass.name == mprop.intro_mclassdef.mclass.name and other.visibility >= protected_visibility then
                                                modelbuilder.advice(self, "full-name-conflict", "Warning: A property named `{other.full_name}` is already defined in module `{other.intro_mclassdef.mmodule}` for the class `{other.intro_mclassdef.mclass.name}`.")
                                                break
                                        end
@@ -1341,6 +1341,16 @@ redef class AAttrPropdef
                                                cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int")
                                        else if nexpr.value isa Byte then
                                                cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Byte")
+                                       else if nexpr.value isa Int8 then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int8")
+                                       else if nexpr.value isa Int16 then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int16")
+                                       else if nexpr.value isa UInt16 then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "UInt16")
+                                       else if nexpr.value isa Int32 then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int32")
+                                       else if nexpr.value isa UInt32 then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "UInt32")
                                        else
                                                # Should not happen, and should be updated as new types are added
                                                abort