Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch with nested choice type with metadata does not parse/validate #878

Open
hugohills-regnosys opened this issue Nov 28, 2024 · 2 comments
Labels
bug Something isn't working subject: model validation This issue is about validation of Rosetta models, such as the type system

Comments

@hugohills-regnosys
Copy link
Contributor

hugohills-regnosys commented Nov 28, 2024

switch with nested choice type with metadata does not parse/validate

  observable switch
      Asset   then Commodity exists,
      Basket  then basketConstituent extract [ Asset -> Commodity exists ] all = True,
      Index   then item ->> assetClass = Commodity, // this line causes issues
      default False 

where:

choice Observable: 
    Asset 
    Basket 
    Index 

choice Index: 
    CreditIndex 
    EquityIndex 
    FloatingRateIndex 
        [metadata location]
    ForeignExchangeRateIndex 
    OtherIndex

Note that if the problematic expression is replaced with item ->> assetClass exists then it works ok.

@hugohills-regnosys hugohills-regnosys added bug Something isn't working subject: model validation This issue is about validation of Rosetta models, such as the type system labels Nov 28, 2024
@hugohills-regnosys
Copy link
Contributor Author

See CDM PR were it was introduced (and then reverted with workaround)
finos/common-domain-model@eb64a52

@SimonCockx
Copy link
Contributor

Problem is not directly with the switch, but an error during indexing in the DerivedStateComputer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subject: model validation This issue is about validation of Rosetta models, such as the type system
Projects
None yet
Development

No branches or pull requests

2 participants