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

Introduce Generic Arrays #472

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Introduce Generic Arrays #472

merged 2 commits into from
Oct 2, 2024

Conversation

mks-h
Copy link
Member

@mks-h mks-h commented Sep 9, 2024

Implements the simple generic array type from #391. Regular generics are out of scope.

Handling logic is combined with the Failable type, centralized, and generalized into the idea of "subset" types. Subset types (purely internal term) are those that are contained within another type, e.g. Text is a subset of Text?, and [Num] is a subset of generic []. This system should also help implement union types.

@mks-h
Copy link
Member Author

mks-h commented Sep 9, 2024

All tests pass for me locally, the CI seems to be broken

@mks-h mks-h marked this pull request as ready for review September 9, 2024 10:46
@mks-h mks-h mentioned this pull request Sep 9, 2024
@Mte90
Copy link
Member

Mte90 commented Sep 9, 2024

Just re-run the action and fix it, until #383 get merged the CI sometimes doens't work.

@mks-h
Copy link
Member Author

mks-h commented Sep 10, 2024

Added an additional test.

src/tests/validity/generic_array_in_argument.ab Outdated Show resolved Hide resolved
src/tests/validity/generic_array_in_argument.ab Outdated Show resolved Hide resolved
src/tests/validity/generic_array_in_argument.ab Outdated Show resolved Hide resolved
src/modules/function/invocation_utils.rs Outdated Show resolved Hide resolved
src/modules/function/ret.rs Outdated Show resolved Hide resolved
src/modules/types.rs Show resolved Hide resolved
src/modules/types.rs Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
@Ph0enixKM Ph0enixKM linked an issue Sep 12, 2024 that may be closed by this pull request
src/modules/types.rs Outdated Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
@mks-h mks-h mentioned this pull request Sep 15, 2024
src/modules/types.rs Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
src/modules/types.rs Outdated Show resolved Hide resolved
Copy link
Member

@Ph0enixKM Ph0enixKM left a comment

Choose a reason for hiding this comment

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

Looking good. Tested

@Mte90 Mte90 merged commit 0e67c89 into amber-lang:master Oct 2, 2024
1 check passed
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.

[Feature] Add an array generic type
6 participants