nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d71adb3
)
core/text: remove call on nullable warnings
author
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 15 Oct 2015 21:35:17 +0000
(17:35 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 15 Oct 2015 21:35:17 +0000
(17:35 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/core/text/flat.nit
patch
|
blob
|
history
diff --git
a/lib/core/text/flat.nit
b/lib/core/text/flat.nit
index
e8a2d4f
..
6cf1584
100644
(file)
--- a/
lib/core/text/flat.nit
+++ b/
lib/core/text/flat.nit
@@
-1148,8
+1148,9
@@
redef class Array[E]
do
var l = length
if l == 0 then return ""
- if l == 1 then if self[0] == null then return "" else return self[0].to_s
- var its = _items
+ var its = _items.as(not null)
+ var first = its[0]
+ if l == 1 then if first == null then return "" else return first.to_s
var na = new NativeArray[String](l)
var i = 0
var sl = 0