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

Remove explicit ref types #1705

Merged
merged 8 commits into from
Jul 13, 2023
Merged

Remove explicit ref types #1705

merged 8 commits into from
Jul 13, 2023

Conversation

fridis
Copy link
Member

@fridis fridis commented Jul 11, 2023

Explicit ref types can be replaced by inheriting from a ref features and using this instead. I do no see that creating a ref explicitly has many advantages.

Not having ref types brings us one step closer to avoiding the double parsing for actual that can be a type or an expression.

Explicit ref version of features, where needed, are created using a parent
feature of `ref` type, i.e., instead of

  a is ...
  v ref a := ...

we use an explicity ref feature `ra` as follows

  ra ref is ...
  a : ra is
  v ra := ...
Ideally, I would like to remove `RefOrVal.Value` altogether, but this is still
used too often in AIR and later phases.
@fridis fridis requested a review from maxteufel July 11, 2023 12:54
maxteufel
maxteufel previously approved these changes Jul 11, 2023
@maxteufel maxteufel dismissed their stale review July 11, 2023 13:26

I did not see that the tests were failing...

Since explicit refs in types are no longer supported, they can no longer result
in errors.
Since explicit refs in types are no longer supported, they can no longer result
in errors.
Copy link
Collaborator

@maxteufel maxteufel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there is still a conflict in lib/container/ctrie.fz according to GitHub.

@maxteufel maxteufel merged commit 9392783 into main Jul 13, 2023
5 checks passed
@fridis fridis deleted the remove_explicit_ref_types branch July 13, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants