Skip to content
New issue

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

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

Already on GitHub? # to your account

Support/fix public type aliases to units. #1702

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

rsmmr
Copy link
Member

@rsmmr rsmmr commented Mar 27, 2024

An alias like public type Unit1 = Unit2 used to lead to C++-side
compiler errors, which this fixes. We also fully support this now by
making both Unit1 and Unit2 available for parsing to host
applications. Internally, the Unit1 parser is just a small facade
pointing to the parsing functions for Unit2.

Closes #1493.

@rsmmr rsmmr requested a review from bbannier April 2, 2024 06:15
bbannier
bbannier previously approved these changes Apr 2, 2024
hilti/toolchain/src/ast/ast-context.cc Outdated Show resolved Hide resolved
hilti/toolchain/include/ast/type.h Show resolved Hide resolved
An alias like `public type Unit1 = Unit2` used to lead to C++-side
compiler errors, which this fixes. We also fully support this now by
making both `Unit1` and `Unit2` available for parsing to host
applications. Internally, the `Unit1` parser is just a small facade
pointing to the parsing functions for `Unit2`.

Closes #1493.
@rsmmr rsmmr force-pushed the topic/robin/gh-1493-type-alias branch from 6bd760c to 6cb6ae8 Compare April 3, 2024 07:33
@rsmmr rsmmr merged commit f4f7f6c into main Apr 3, 2024
12 of 19 checks passed
@rsmmr rsmmr deleted the topic/robin/gh-1493-type-alias branch April 3, 2024 07:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Presence of type alias causes ambiguity in generated code
2 participants