core: fix warnings in error
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 20 Apr 2016 05:53:37 +0000 (01:53 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 31 May 2016 23:43:20 +0000 (19:43 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/core/error.nit

index ac13301..6a58480 100644 (file)
@@ -86,6 +86,6 @@ class MaybeError[V, E: Error]
        redef fun to_s do
                var e = maybe_error
                if e != null then return e.to_s
-               return value.to_s
+               return value.as(not null).to_s
        end
 end