Class Depth in Inheritance Tree

Following the longest path composed only of extends edges from self to Object

Property definitions

nitc :: inheritance_metrics $ MClass :: ditc
	# Class Depth in Inheritance Tree
	#
	# Following the longest path composed only of extends edges from self to Object
	fun ditc(mainmodule: MModule): Int do
		if in_hierarchy(mainmodule).direct_greaters.is_empty then
			return 0
		end
		var min = -1
		for p in in_hierarchy(mainmodule).direct_greaters do
			if p.kind != abstract_kind and p.kind != concrete_kind and p.kind != extern_kind then continue
			var d = p.ditc(mainmodule) + 1
			if min == -1 or d < min then
				min = d
			end
		end
		if min == -1 then min = 0
		return min
	end
src/metrics/inheritance_metrics.nit:509,2--526,4