Return the nullable version of the type

If the type is already nullable then self is returned

Property definitions

nitc $ MType :: as_nullable
	# Return the nullable version of the type
	# If the type is already nullable then self is returned
	fun as_nullable: MType
	do
		var res = self.as_nullable_cache
		if res != null then return res
		res = new MNullableType(self)
		self.as_nullable_cache = res
		return res
	end
src/model/model.nit:1191,2--1200,4

nitc $ MProxyType :: as_nullable
	redef fun as_nullable do return mtype.as_nullable
src/model/model.nit:1783,2--50

nitc $ MNullType :: as_nullable
	redef fun as_nullable do return self
src/model/model.nit:1899,2--37

nitc $ MBottomType :: as_nullable
	redef fun as_nullable do return model.null_type
src/model/model.nit:1926,2--48

nitc $ MInitType :: as_nullable
	redef fun as_nullable do return self
src/vm/virtual_machine.nit:898,2--37

nitc $ MRawType :: as_nullable
	redef fun as_nullable do
		not_available
		return self
	end
src/doc/model_ext.nit:32,2--35,4

nitc $ MNullableType :: as_nullable
	redef fun as_nullable do return self
src/model/model.nit:1845,2--37