phase: make `phases_list` lazy because of run_phases_on_npropdef
authorJean Privat <jean@pryen.org>
Sat, 27 Dec 2014 04:40:58 +0000 (23:40 -0500)
committerJean Privat <jean@pryen.org>
Sat, 27 Dec 2014 04:51:12 +0000 (23:51 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/phase.nit

index f927dc1..55853a5 100644 (file)
@@ -69,8 +69,8 @@ redef class ToolContext
                if opt_sloppy.value then semantize_is_lazy = true
        end
 
-       fun phases_list: Sequence[Phase]
-       do
+       # The list of phases in the order to run them
+       var phases_list: Sequence[Phase] is lazy do
                var phases = self.phases.to_a
                self.phases.sort(phases)
                return phases