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

Optional Reference Types and References to Optional Types are represented with the same TypeID #3248

Closed
dsainati1 opened this issue Apr 16, 2024 · 1 comment · Fixed by #3272
Assignees
Labels
Bug Something isn't working Feedback

Comments

@dsainati1
Copy link
Contributor

Current Behavior

There is currently an ambiguity in the creation of type IDs between references to optionals and optional references. I.e., a ReferenceType(OptionalType(T)) will be rendered as &T?, and OptionalType(ReferenceType(T)) is also rendered as &T?.

Expected Behavior

We should produce non-ambiguous TypeIDs for these two cases.

TODOs:

  • What should the representation for these be?
  • How and when should we migrate existing TypeIDs to the new format?
  • Check whether or not the typeIDs of these values are stored here

Steps To Reproduce

N/A

Environment

See https://github.com/onflow/cadence/pull/3232
@dsainati1
Copy link
Contributor Author

This blocks #3232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants