nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82422f3
)
metrics: --nullable use `is_null_safe`
author
Jean Privat
<jean@pryen.org>
Wed, 27 May 2015 23:23:44 +0000
(19:23 -0400)
committer
Jean Privat
<jean@pryen.org>
Wed, 27 May 2015 23:23:44 +0000
(19:23 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/metrics/nullables_metrics.nit
patch
|
blob
|
history
diff --git
a/src/metrics/nullables_metrics.nit
b/src/metrics/nullables_metrics.nit
index
2c96462
..
aa145c6
100644
(file)
--- a/
src/metrics/nullables_metrics.nit
+++ b/
src/metrics/nullables_metrics.nit
@@
-131,8
+131,8
@@
private class NullableSends
end
t = t.anchor_to(self.nclassdef.mclassdef.mmodule, self.nclassdef.mclassdef.bound_mtype)
if t isa MNullableType then
- var name = n.callsite.mproperty.name
- if name == "==" or name == "!=" or name == "is_same_instance" then
+ var p = n.callsite.mproperty
+ if p.is_null_safe then
self.nullable_eq_sends += 1
else
self.nullable_sends += 1