nitc :: TypeInitVisitor :: defaultinit
# Visitor looking for initialized `MType` (new T).
#
# See `NewCmd`.
private class TypeInitVisitor
super Visitor
var mclass: MClass
var called = false
redef fun visit(node)
do
node.visit_all(self)
# look for init
if not node isa ANewExpr then return
var mtype = node.n_type.mtype
if mtype == null then return
if mtype isa MNullableType then mtype = mtype.mtype
if not mtype isa MClassType then return
if mtype.mclass != mclass then return
called = true
end
end
src/doc/commands/commands_usage.nit:165,1--189,3