Skip to content

Commit

Permalink
Fixed metadata on choice options (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCockx authored Jul 31, 2024
1 parent 9492ad2 commit ba2bf09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions rosetta-lang/src/main/java/com/regnosys/rosetta/Rosetta.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Choice:

ChoiceOption:
RosettaTyped RosettaDefinable?
(References|Annotations|Synonyms)*
RuleReference?
;

Attribute:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,11 @@ class FunctionGeneratorTest {
@Test
def void testDeepPathOperatorWithMeta() {
val code = '''
type A:
b B (0..1)
choice A:
B
[metadata reference]
c C (0..1)
C
[metadata reference]
condition Choice:
one-of
type B:
[metadata key]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ class RosettaValidatorTest implements RosettaIssueCodes {
@Test
def void testCanAccessMetaFeatureAfterDeepFeatureCall() {
val context = '''
type A:
b B (0..1)
choice A:
B
[metadata reference]
c C (0..1)
C
[metadata reference]
condition Choice:
one-of
type B:
[metadata key]
Expand Down

0 comments on commit ba2bf09

Please sign in to comment.