ni_nitdoc: Use only CSS to highlight current anchor
[nit.git] / src / modelize_class.nit
index 14952d1..483036b 100644 (file)
@@ -117,6 +117,7 @@ redef class ModelBuilder
                                        return
                                end
                                names.add(ptname)
+                               nfd.mtype = mclass.mclass_type.arguments[i].as(MParameterType)
                        end
 
                        # Revolve bound for formal parameter names
@@ -131,13 +132,18 @@ redef class ModelBuilder
                                                error(nfd, "Error: Formal parameter type `{names[i]}' bounded with a formal parameter type")
                                        else
                                                bounds.add(bound)
+                                               nfd.bound = bound
                                        end
                                else if mclass.mclassdefs.is_empty then
                                        # No bound, then implicitely bound by nullable Object
-                                       bounds.add(objectclass.mclass_type.as_nullable)
+                                       var bound = objectclass.mclass_type.as_nullable
+                                       bounds.add(bound)
+                                       nfd.bound = bound
                                else
                                        # Inherit the bound
-                                       bounds.add(mclass.intro.bound_mtype.arguments[i])
+                                       var bound = mclass.intro.bound_mtype.arguments[i]
+                                       bounds.add(bound)
+                                       nfd.bound = bound
                                end
                        end
                end
@@ -488,6 +494,14 @@ redef class AExternClasskind
        redef fun mkind do return extern_kind
 end
 
+redef class AFormaldef
+       # The associated parameter type
+       var mtype: nullable MParameterType = null
+
+       # The associated bound
+       var bound: nullable MType = null
+end
+
 redef class AType
        # The mtype associated to the node
        var mtype: nullable MType = null