model: Error on attempt to define attribute in an extern class
authorJean Privat <jean@pryen.org>
Sat, 16 Mar 2013 02:01:03 +0000 (22:01 -0400)
committerJean Privat <jean@pryen.org>
Sat, 16 Mar 2013 02:14:42 +0000 (22:14 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/modelbuilder.nit

index 1d866e1..64b1a5a 100644 (file)
@@ -1379,6 +1379,8 @@ redef class AAttrPropdef
                        modelbuilder.error(self, "Error: Attempt to define attribute {name} in the interface {mclass}.")
                else if mclass.kind == enum_kind then
                        modelbuilder.error(self, "Error: Attempt to define attribute {name} in the enum class {mclass}.")
+               else if mclass.kind == extern_kind then
+                       modelbuilder.error(self, "Error: Attempt to define attribute {name} in the extern class {mclass}.")
                end
 
                var nid = self.n_id