model: make `MPropDef::is_intro` more robust
authorJean Privat <jean@pryen.org>
Tue, 6 Oct 2015 15:50:59 +0000 (11:50 -0400)
committerJean Privat <jean@pryen.org>
Tue, 6 Oct 2015 15:50:59 +0000 (11:50 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/model/model.nit

index 8d6bf7a..941bae7 100644 (file)
@@ -2301,7 +2301,7 @@ abstract class MPropDef
        redef var to_s: String is noinit
 
        # Is self the definition that introduce the property?
-       fun is_intro: Bool do return mproperty.intro == self
+       fun is_intro: Bool do return isset mproperty._intro and mproperty.intro == self
 
        # Return the next definition in linearization of `mtype`.
        #