X-Git-Url: http://nitlanguage.org diff --git a/src/metrics/static_types_metrics.nit b/src/metrics/static_types_metrics.nit index 5276632..45c429b 100644 --- a/src/metrics/static_types_metrics.nit +++ b/src/metrics/static_types_metrics.nit @@ -53,8 +53,9 @@ private class ATypeCounterVisitor do if n isa AAnnotation then return - if n isa AType then - var mclassdef = self.nclassdef.mclassdef.as(not null) + if n isa AType then do + var mclassdef = self.nclassdef.mclassdef + if mclassdef == null then break var mtype = modelbuilder.resolve_mtype(mclassdef, n) if mtype != null then self.typecount.inc(mtype)