contrib: fix call on nullable receiver warnings
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 20 Apr 2016 06:37:09 +0000 (02:37 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 20 Apr 2016 22:40:49 +0000 (18:40 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

contrib/neo_doxygen/src/neo_doxygen.nit
contrib/rss_downloader/src/rss_downloader.nit

index 0713567..30421eb 100644 (file)
@@ -62,7 +62,7 @@ class NeoDoxygenJob
                loop
                        for f in list_files(dir) do
                                var path = dir/f
-                               if path.file_stat.is_dir then
+                               if path.file_stat.as(not null).is_dir then
                                        directories.push(path)
                                else if f.has_suffix(".xml") and f != "index.xml" then
                                        reader.read(path)
index b5c884b..a738c05 100644 (file)
@@ -170,7 +170,7 @@ class Downloader
                        # Download element
                        if sys.verbose then print "+ Acting on {element}"
 
-                       tool_config.act_on element
+                       tool_config.as(not null).act_on element
 
                        # Add `unique_id` to log
                        history.add unique_id
@@ -205,7 +205,7 @@ class Downloader
                                continue
                        end
 
-                       for dir in source_folder.files do if dir.stat.is_dir then
+                       for dir in source_folder.files do if dir.stat.as(not null).is_dir then
                                folder_names.add dir.filename
                        end
                end
@@ -271,8 +271,8 @@ redef class Text
 
                var elements = new Array[Element]
                for item in items do
-                       var title = item[tool_config.tag_title].first.as(XMLStartTag).data
-                       var link = item[tool_config.tag_link].first.as(XMLStartTag).data
+                       var title = item[tool_config.as(not null).tag_title].first.as(XMLStartTag).data
+                       var link = item[tool_config.as(not null).tag_link].first.as(XMLStartTag).data
 
                        elements.add new Element(title, link)
                end