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

feat: restrict value type for builtin functions (cd, mv) to be of type Text #400

Merged

Conversation

MuhamedMagdi
Copy link
Contributor

This update ensures that the arguments passed to the cd and mv commands are of type Text.

closes #369

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.

Can you do the same for mv as well? Besides that - looking good

@MuhamedMagdi
Copy link
Contributor Author

Can you do the same for mv as well?

This PR also includes the restriction for mv, or do you mean something else?

@Ph0enixKM
Copy link
Member

Can you do the same for mv as well?

This PR also includes the restriction for mv, or do you mean something else?

Yes I mean the restriction. But for details - look in the comment. There is some other API that I suggested

@Ph0enixKM
Copy link
Member

Oh hang on. The commend disappeared. Let me retype it

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.

@MuhamedMagdi sorry for making confusions. Here is the suggestion that I forgot to mention.

(And could you please apply the same new API to the mv command?)

src/modules/builtin/cd.rs Outdated Show resolved Hide resolved
@Ph0enixKM
Copy link
Member

@MuhamedMagdi don't worry about failing abs test. This has to be fixed in another PR.

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.

Looks good

@b1ek b1ek merged commit 78b91aa into amber-lang:master Aug 11, 2024
1 check failed
@MuhamedMagdi MuhamedMagdi deleted the feat/restric-builtin-type-to-text branch August 11, 2024 08:07
Mte90 pushed a commit to Mte90/Amber that referenced this pull request Sep 19, 2024
… type `Text` (amber-lang#400)

* feat: restrict value type for builtin functions to be of type `Text`

* refactor: use the new `Expr` position api
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] Restrict the value types of builtin functions.
3 participants