nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bdd014
)
dom: return a more precise `Array[XMLTag]` as the doc already said
author
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 21 May 2017 15:54:21 +0000
(08:54 -0700)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 23 May 2017 11:31:20 +0000
(
04:31
-0700)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/dom/dom.nit
patch
|
blob
|
history
diff --git
a/lib/dom/dom.nit
b/lib/dom/dom.nit
index
786bdcc
..
8c4c08e
100644
(file)
--- a/
lib/dom/dom.nit
+++ b/
lib/dom/dom.nit
@@
-30,9
+30,9
@@
redef class XMLEntity
# assert xml["animal"].length == 1
# assert xml["animal"].first["cat"].length == 2
# ~~~
- fun [](tag_name: String): Array[XMLEntity]
+ fun [](tag_name: String): Array[XMLTag]
do
- var res = new Array[XMLEntity]
+ var res = new Array[XMLTag]
for child in children do
if child isa XMLTag and child.tag_name == tag_name then
res.add child