-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
While multiple inheritance is supported in the SimpleClassDiagrams formalism, creating an instance that has diamond inheritance gives an error "500:constraint (post-create noInheritanceLoops) failed".
Is this intended behavior?
- If so, we must make it explicit that diamond inheritance is not allowed.
- Otherwise, the constraint checking function should be fixed to allow this.
The constraint checking function is currently as follows:
var mm = '/Formalisms/__LanguageSyntax__/SimpleClassDiagram/SimpleClassDiagram/',
nout = getNeighbors('>',mm+'Class'),
visited = [];
function dfs(to_visit)
{
var curr = to_visit.pop();
if( curr == undefined )
return true;
else if( visited.indexOf(curr) > -1 )
return false;
else
{
visited.push(curr);
var ntype = (getAttr('$type',curr) == mm+'Class' ?
mm+'Inheritance' : mm+'Class');
return dfs( to_visit.concat(getNeighbors('>',ntype,curr)) );
}
}
dfs(nout);
Metadata
Metadata
Assignees
Labels
No labels
