Commit f79cab40 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added constraint for recursive extension, #195

parent 40eac6e5
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ context Extension
  inv Extension ('The element containing an \'Extension\' and the element in the \'extending\' property shall have the same meta-class.' + self.toString()):
        self.container().oclType()  = self.extending.oclType()
  
  -- No recursive extension
  inv NoRecursiveExtension ('The element containing an \'Extension\' shall not extend itself directly or indirectly.' + self.toString()):
        not Set{self}->closure(e | e.transitiveExtending())->collect(e|e.extending)->includes(self.container())