finos / rune-dsl

The project containing the Rune DSL grammar and default code generators
Apache License 2.0
27 stars 30 forks source link

Using fully qualified name of enum in expression returns class cast error #794

Closed davidalk closed 2 months ago

davidalk commented 3 months ago

If use a fully qualified name of an enum literal in an expression then you get the following error:

java.lang.ClassCastException: class com.regnosys.rosetta.types.REnumType cannot be cast to class com.regnosys.rosetta.types.RDataType (com.regnosys.rosetta.types.REnumType and com.regnosys.rosetta.types.RDataType are in unnamed module of loader 'app')

A minimum reproduction of this can be seen by creating the following function:

func Test:
    output:
        partyIdType cdm.base.staticdata.party.PartyIdentifierTypeEnum (1..1)
    set partyIdType: cdm.base.staticdata.party.PartyIdentifierTypeEnum -> BIC
davidalk commented 2 months ago

Resolved