Merge: core: fix some "call on nullable" warnings
authorJean Privat <jean@pryen.org>
Wed, 1 Jun 2016 01:24:31 +0000 (21:24 -0400)
committerJean Privat <jean@pryen.org>
Wed, 1 Jun 2016 01:24:31 +0000 (21:24 -0400)
commit2504cd964ff175f048d11ee80d937acab7b6c773
tree66022286d69f803442aa4e25e36bd1ec48d7d047
parentae27f989e4c248586049cd4205cf749f0720681c
parente4d18a4942cc5178b2a04423cc9fc2eb416a438a
Merge: core: fix some "call on nullable" warnings

Too tired too work but no enough to sleep...

According to Jenkins [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.795683049/), [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.-1960060028/) and [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.1056020115/), this PR should fix the remaining warning of `core/`.

The algorithm used for the human/pillow approach was:

~~~
1. can it be fixed shamelessly with a .as(not null) ?
    yes: add that sweet .as(not null) and hope for the best
2. is there more than one occurrence of the variable involved?
    yes: factorise with a local variable, add that sweet .as(not null) and hope for the best
3. is this code to complex for my human/pillow head?
    yes: shame = false, fallback to 1.
abort "Not yet occurred case..."
~~~

There is love for @R4PaSs (core::text), @xymus (core::re) and @privat (core::*).

TL;DR No more warnings in core.

Pull-Request: #2027
Reviewed-by: Jean Privat <jean@pryen.org>
lib/core/file.nit