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

Setting properties of an alias in a function leads to a static compilation error #633

Open
SimonCockx opened this issue Aug 31, 2023 · 1 comment
Labels
bug Something isn't working subject: code generation This issue is about code generation subject: model validation This issue is about validation of Rosetta models, such as the type system

Comments

@SimonCockx
Copy link
Contributor

type Person:
    name string (1..1)
    boss Person (0..1)

func ReplaceBoss:
    inputs:
        person Person (1..1)
        boss Person (1..1)
    output:
        result Person (1..1)

    alias personWithOtherBoss: person
    set personWithOtherBoss -> boss: boss
    
    set result: personWithOtherBoss

leads to

cannot find symbol
				.setBoss(MapperS.of(boss).get());
				^
  symbol:   method setBoss(Person)
  location: variable person of type Person
@SimonCockx SimonCockx added bug Something isn't working subject: code generation This issue is about code generation subject: model validation This issue is about validation of Rosetta models, such as the type system labels Aug 31, 2023
@SimonCockx
Copy link
Contributor Author

SimonCockx commented Aug 31, 2023

Should this be supported? Or should we raise an error?

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: code generation This issue is about code generation 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

1 participant