Signed-off-by: Jean Privat <jean@pryen.org>
+redef class AExpr
+ # Make the `mtype` of the expression live
+ # Used by literals and instantiations
+ fun allocate_mtype(v: RapidTypeVisitor)
+ do
+ var mtype = self.mtype
+ if not mtype isa MClassType then return
+ v.add_type(self.mtype.as(MClassType))
+ end
+end
+
redef class AIntExpr
redef fun accept_rapid_type_visitor(v)
do
redef class AIntExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))
end
end
redef class AByteExpr
redef fun accept_rapid_type_visitor(v)
do
end
end
redef class AByteExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))
end
end
redef class AFloatExpr
redef fun accept_rapid_type_visitor(v)
do
end
end
redef class AFloatExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))
end
end
redef class ACharExpr
redef fun accept_rapid_type_visitor(v)
do
end
end
redef class ACharExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))
redef class ATrueExpr
redef fun accept_rapid_type_visitor(v)
do
redef class ATrueExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))
end
end
redef class AFalseExpr
redef fun accept_rapid_type_visitor(v)
do
end
end
redef class AFalseExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_type(self.mtype.as(MClassType))