nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename REAMDE to README.md
[nit.git]
/
src
/
model
/
mmodule.nit
diff --git
a/src/model/mmodule.nit
b/src/model/mmodule.nit
index
d88a0ba
..
ef548a8
100644
(file)
--- a/
src/model/mmodule.nit
+++ b/
src/model/mmodule.nit
@@
-243,5
+243,15
@@
class MModule
# Is `self` a unit test module used by `nitunit`?
var is_test_suite: Bool = false is writable
# Is `self` a unit test module used by `nitunit`?
var is_test_suite: Bool = false is writable
+ # Get the first non `is_fictive` module greater than self
+ fun first_real_mmodule: MModule
+ do
+ var mmodule = self
+ while mmodule.is_fictive do
+ mmodule = mmodule.in_importation.direct_greaters.first
+ end
+ return mmodule
+ end
+
redef fun parent_concern do return mgroup
end
redef fun parent_concern do return mgroup
end