model: really implement precondition of lookup_first_definition
authorJean Privat <jean@pryen.org>
Tue, 12 Nov 2013 05:54:28 +0000 (00:54 -0500)
committerJean Privat <jean@pryen.org>
Tue, 12 Nov 2013 05:54:28 +0000 (00:54 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/model/model.nit

index f493353..11bdce3 100644 (file)
@@ -1680,6 +1680,7 @@ abstract class MProperty
        # REQUIRE: `mtype.has_mproperty(mmodule, self)`
        fun lookup_first_definition(mmodule: MModule, mtype: MType): MPROPDEF
        do
+               assert mtype.has_mproperty(mmodule, self)
                return lookup_all_definitions(mmodule, mtype).first
        end