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

checker: disallow casting strings to pointers outside unsafe #19977

Merged
merged 6 commits into from
Nov 24, 2023

Conversation

Delta456
Copy link
Member

@Delta456 Delta456 commented Nov 23, 2023

🤖[deprecated] Generated by Copilot at 3b399f5

Prevent casting strings to pointers in the checker module. Add a new test file invalid_string_cast_to_pointers_err.vv to verify the error case.

🤖[deprecated] Generated by Copilot at 3b399f5

  • Add a new error case to the checker module to prevent casting a string to a pointer type (link)
  • Add a new test file to the checker tests to verify the new error case (link, link)

@Delta456 Delta456 marked this pull request as draft November 23, 2023 17:03
@Delta456 Delta456 marked this pull request as ready for review November 23, 2023 18:18
@Delta456 Delta456 changed the title checker: disallow casting strings to pointers checker: disallow casting strings to pointers outside unsafe Nov 23, 2023
vlib/v/checker/checker.v Outdated Show resolved Hide resolved
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Good work.

@spytheman spytheman merged commit 2884ec5 into vlang:master Nov 24, 2023
54 checks passed
@Delta456 Delta456 deleted the disallow_string_cast_to_pointers branch November 24, 2023 09:32
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.

2 participants