From 379cf93158718ce3797e26ea40134c3614b910f2 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 10 Jun 2014 14:45:42 -0400 Subject: [PATCH] modelize_property: remove double check of duplicate property One is enough. Moreover, the removed-one is buggy since only AMethPropdef is checked. Signed-off-by: Jean Privat --- src/modelize_property.nit | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/modelize_property.nit b/src/modelize_property.nit index 7bcccf8..83b689f 100644 --- a/src/modelize_property.nit +++ b/src/modelize_property.nit @@ -211,10 +211,6 @@ redef class MClass var inherit_init_from: nullable MClass = null end -redef class MClassDef - private var propdef_names = new HashSet[String] -end - redef class MPropDef # Does the MPropDef contains a call to super or a call of a super-constructor? # Subsequent phases of the frontend (esp. typing) set it if required @@ -462,20 +458,6 @@ redef class AMethPropdef var mpropdef = new MMethodDef(mclassdef, mprop, self.location) - if mclassdef.propdef_names.has(mprop.name) then - var loc: nullable Location = null - for i in mclassdef.mpropdefs do - if i.mproperty.name == mprop.name then - loc = i.location - break - end - end - if loc == null then abort - modelbuilder.error(self, "Error: a property {mprop} is already defined in class {mclassdef.mclass} at {loc}") - end - - mclassdef.propdef_names.add(mpropdef.mproperty.name) - set_doc(mpropdef) self.mpropdef = mpropdef -- 1.7.9.5