Merge: new `with` statement
[nit.git] / src / highlight.nit
index f4268c0..39a042a 100644 (file)
@@ -510,6 +510,33 @@ redef class MNullableType
        end
 end
 
+redef class MNotNullType
+       redef fun infobox(v)
+       do
+               return mtype.infobox(v)
+       end
+       redef fun linkto
+       do
+               var res = new HTMLTag("span")
+               res.append("not null ").add(mtype.linkto)
+               return res
+       end
+end
+
+redef class MNullType
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, to_s)
+               return res
+       end
+       redef fun linkto
+       do
+               var res = new HTMLTag("span")
+               res.append("null")
+               return res
+       end
+end
+
 redef class MSignature
        redef fun linkto
        do
@@ -870,7 +897,7 @@ redef class AType
        do
                var mt = mtype
                if mt == null then return null
-               mt = mt.as_notnullable
+               mt = mt.undecorate
                if mt isa MFormalType then
                        res.add_class("nc_vt")
                end