nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src: use `as_notnullable` in code
[nit.git]
/
src
/
metrics
/
rta_metrics.nit
diff --git
a/src/metrics/rta_metrics.nit
b/src/metrics/rta_metrics.nit
index
40408f3
..
1224513
100644
(file)
--- a/
src/metrics/rta_metrics.nit
+++ b/
src/metrics/rta_metrics.nit
@@
-376,7
+376,7
@@
redef class RapidTypeAnalysis
super
tnlc.values.inc(mtype)
super
tnlc.values.inc(mtype)
- if mtype isa MNullableType then mtype = mtype.mtype
+ mtype = mtype.as_notnullable
if mtype isa MClassType then
cnlc.values.inc(mtype.mclass)
end
if mtype isa MClassType then
cnlc.values.inc(mtype.mclass)
end
@@
-387,8
+387,7
@@
end
redef class MType
private fun signature_depth: Int do
redef class MType
private fun signature_depth: Int do
- var mtype = self
- if mtype isa MNullableType then mtype = mtype.mtype
+ var mtype = self.as_notnullable
if not mtype isa MGenericType then return 0
var depth = 0
if not mtype isa MGenericType then return 0
var depth = 0