1+ //*
2+ XPECT_SETUP org.omg.kerml.xpect.tests.parsing.KerMLParsingTest
3+ ResourceSet {
4+ ThisFile {}
5+ File {from ="/library/Base.kerml"}
6+ File {from ="/library/Links.kerml"}
7+ File {from ="/library/Occurrences.kerml"}
8+ File {from ="/library/Performances.kerml"}
9+ File {from ="/library/Objects.kerml"}
10+ File {from ="/library/Metaobjects.kerml"}
11+ }
12+ Workspace {
13+ JavaProject {
14+ SrcFolder {
15+ ThisFile {}
16+ File {from ="/library/Base.kerml"}
17+ File {from ="/library/Links.kerml"}
18+ File {from ="/library/Occurrences.kerml"}
19+ File {from ="/library/Performances.kerml"}
20+ File {from ="/library/Objects.kerml"}
21+ File {from ="/library/Metaobjects.kerml"}
22+ }
23+ }
24+ }
25+ END_SETUP
26+ */
27+
28+ // XPECT noErrors ---> ""
29+ package Associations {
30+ datatype X;
31+ class Y;
32+
33+ assoc A {
34+ end x_cross [1..1] feature x : X;
35+ end y_cross [1..*] feature y : Y;
36+ }
37+
38+ assoc B specializes A {
39+ end x1;
40+ end [0..*] feature y1 redefines y;
41+ }
42+
43+ metaclass M;
44+ assoc XY {
45+ // Ensure that the owned cross feature is typed correctly,
46+ // even though getting type of end feature requires resolving
47+ // metadata nam to check if it is SemanticMetadata, which
48+ // requires getting supertypes of end feature, including its types.
49+ end [0..1] #M feature x : X;
50+ end [0..1] #M feature y : Y;
51+ }
52+ }
0 commit comments