Skip to content

Commit aa72c30

Browse files
committed
ST6RI-728 Created Xpect test that fails due to redefinition anomaly.
1 parent 55e34e2 commit aa72c30

2 files changed

Lines changed: 64 additions & 12 deletions

File tree

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
package Redefinition {
2-
class Occurrence;
3-
class Transfer {
4-
feature transferSource;
5-
feature item;
6-
assoc SourceOutputLink specializes Objects::BinaryLinkObject {
7-
end [1] feature source: Occurrence;
8-
end [1..*] feature target: Occurrence;
9-
}
10-
connector sourceOutputLink: SourceOutputLink[1..*] from transferSource to item {
11-
feature startShot: Occurrence redefines SourceOutputLink::startShot;
12-
feature endShot: Occurrence redefines SourceOutputLink::endShot;
13-
}
2+
3+
classifier A {
4+
feature f;
5+
}
6+
7+
classifier B specializes A {
8+
feature redefines f {
9+
feature g;
10+
}
11+
}
12+
13+
classifier C specializes A, B {
14+
feature subsets f {
15+
feature redefines g;
16+
}
17+
}
18+
19+
class X {
20+
feature redefines startShot;
21+
feature redefines endShot;
1422
}
1523
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//* XPECT_SETUP org.omg.kerml.xpect.tests.parsing.KerMLParsingTest
2+
ResourceSet {
3+
ThisFile {}
4+
File {from ="/library/Base.kerml"}
5+
File {from ="/library/Links.kerml"}
6+
File {from ="/library/Occurrences.kerml"}
7+
}
8+
Workspace {
9+
JavaProject {
10+
SrcFolder {
11+
ThisFile {}
12+
File {from ="/library/Base.kerml"}
13+
File {from ="/library/Links.kerml"}
14+
File {from ="/library/Occurrences.kerml"}
15+
}
16+
}
17+
}
18+
END_SETUP
19+
*/
20+
21+
// XPECT noErrors ---> ""
22+
package Redefinition {
23+
24+
classifier A {
25+
feature f;
26+
}
27+
28+
classifier B specializes A {
29+
feature redefines f {
30+
feature g;
31+
}
32+
}
33+
34+
classifier C specializes A, B {
35+
feature subsets f {
36+
feature redefines g;
37+
}
38+
}
39+
40+
class X {
41+
feature redefines startShot;
42+
feature redefines endShot;
43+
}
44+
}

0 commit comments

Comments
 (0)