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
/
model
/
model.nit
diff --git
a/src/model/model.nit
b/src/model/model.nit
index
f69f4c4
..
2a5a092
100644
(file)
--- a/
src/model/model.nit
+++ b/
src/model/model.nit
@@
-1647,7
+1647,7
@@
abstract class MProperty
fun lookup_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
fun lookup_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
- if mtype isa MNullableType then mtype = mtype.mtype
+ mtype = mtype.as_notnullable
var cache = self.lookup_definitions_cache[mmodule, mtype]
if cache != null then return cache
var cache = self.lookup_definitions_cache[mmodule, mtype]
if cache != null then return cache
@@
-1686,7
+1686,7
@@
abstract class MProperty
fun lookup_super_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
fun lookup_super_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
- if mtype isa MNullableType then mtype = mtype.mtype
+ mtype = mtype.as_notnullable
# First, select all candidates
var candidates = new Array[MPROPDEF]
# First, select all candidates
var candidates = new Array[MPROPDEF]
@@
-1763,7
+1763,7
@@
abstract class MProperty
fun lookup_all_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
fun lookup_all_definitions(mmodule: MModule, mtype: MType): Array[MPROPDEF]
do
assert not mtype.need_anchor
- if mtype isa MNullableType then mtype = mtype.mtype
+ mtype = mtype.as_notnullable
var cache = self.lookup_all_definitions_cache[mmodule, mtype]
if cache != null then return cache
var cache = self.lookup_all_definitions_cache[mmodule, mtype]
if cache != null then return cache